kimi-plugin-cc 2.7.3 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +3 -16
- package/README.md +428 -515
- package/assets/logo.svg +6 -0
- package/cordis.patch.yml +18 -0
- package/dist/background-spawn.js +14 -19
- package/dist/cli-client.js +163 -105
- package/dist/commands/ask.js +44 -96
- package/dist/commands/cancel.js +11 -59
- package/dist/commands/cli-helpers.js +102 -1
- package/dist/commands/models.js +2 -3
- package/dist/commands/pursue.js +8 -21
- package/dist/commands/registry.js +7 -26
- package/dist/commands/repair-sessions.js +121 -12
- package/dist/commands/replay.js +4 -3
- package/dist/commands/rescue.js +29 -87
- package/dist/commands/result.js +7 -1
- package/dist/commands/review.js +28 -18
- package/dist/commands/setup.js +813 -462
- package/dist/commands/status.js +2 -2
- package/dist/commands/swarm.js +112 -125
- package/dist/commands/worker.js +1 -2
- package/dist/companion.js +145 -19
- package/dist/git.js +1 -9
- package/dist/help.js +13 -9
- package/dist/hook-escape.js +7 -16
- package/dist/hooks/approval-hook.js +1766 -87
- package/dist/hooks/approval-policy.js +86 -19
- package/dist/hooks/config-safety.js +31 -64
- package/dist/hooks/hook-timing.js +48 -0
- package/dist/hooks/install-paths.js +179 -107
- package/dist/hooks/install.js +126 -53
- package/dist/hooks/managed-block.js +121 -127
- package/dist/job-store.js +206 -166
- package/dist/jobs.js +66 -19
- package/dist/kimi-command.js +74 -1
- package/dist/kimi-engine.js +198 -127
- package/dist/kimi-errors.js +15 -70
- package/dist/kimi-home.js +6 -0
- package/dist/kimi-journal.js +42 -0
- package/dist/kimi-releases.js +123 -0
- package/dist/kimi-timeouts.js +2 -16
- package/dist/kimi-version-probe.js +24 -108
- package/dist/logging.js +12 -7
- package/dist/mcp/binding.js +13 -4
- package/dist/mcp/job-control.js +390 -95
- package/dist/mcp/launcher.js +13 -7
- package/dist/mcp/operations.js +405 -179
- package/dist/mcp/protocol.js +124 -33
- package/dist/mcp/skills.js +130 -0
- package/dist/mcp/stdio.js +18 -4
- package/dist/model-command.js +5 -3
- package/dist/native-v2-preflight.js +243 -80
- package/dist/parsing.js +211 -243
- package/dist/paths.js +28 -10
- package/dist/plugin-data.js +28 -83
- package/dist/process-tree.js +35 -24
- package/dist/read-scope.js +435 -0
- package/dist/render.js +58 -46
- package/dist/rescue-approval.js +461 -84
- package/dist/session-references.js +216 -0
- package/dist/session-title.js +26 -6
- package/dist/stream-json.js +1 -3
- package/dist/surface-routing.js +108 -0
- package/dist/swarm-activation.js +74 -188
- package/dist/swarm-policy.js +2 -1
- package/dist/swarm-recovery.js +2 -1
- package/dist/util.js +28 -0
- package/dist/version.js +1 -1
- package/docs/migration.md +45 -206
- package/docs/models.md +24 -66
- package/docs/safety.md +198 -353
- package/docs/session-visibility.md +25 -13
- package/docs/swarm-recovery.md +26 -20
- package/dsh/index.json +54 -0
- package/mcp_config.json +10 -0
- package/package.json +23 -82
- package/plugin.json +19 -0
- package/plugins/kimi-codex/.codex-plugin/plugin.json +7 -7
- package/plugins/kimi-codex/.mcp.json +3 -3
- package/plugins/kimi-codex/dist/background-spawn.js +14 -19
- package/plugins/kimi-codex/dist/cli-client.js +163 -105
- package/plugins/kimi-codex/dist/commands/ask.js +44 -96
- package/plugins/kimi-codex/dist/commands/cancel.js +11 -59
- package/plugins/kimi-codex/dist/commands/cli-helpers.js +102 -1
- package/plugins/kimi-codex/dist/commands/models.js +2 -3
- package/plugins/kimi-codex/dist/commands/pursue.js +8 -21
- package/plugins/kimi-codex/dist/commands/registry.js +7 -26
- package/plugins/kimi-codex/dist/commands/repair-sessions.js +121 -12
- package/plugins/kimi-codex/dist/commands/replay.js +4 -3
- package/plugins/kimi-codex/dist/commands/rescue.js +29 -87
- package/plugins/kimi-codex/dist/commands/result.js +7 -1
- package/plugins/kimi-codex/dist/commands/review.js +28 -18
- package/plugins/kimi-codex/dist/commands/setup.js +813 -462
- package/plugins/kimi-codex/dist/commands/status.js +2 -2
- package/plugins/kimi-codex/dist/commands/swarm.js +112 -125
- package/plugins/kimi-codex/dist/commands/worker.js +1 -2
- package/plugins/kimi-codex/dist/companion.js +145 -19
- package/plugins/kimi-codex/dist/git.js +1 -9
- package/plugins/kimi-codex/dist/help.js +13 -9
- package/plugins/kimi-codex/dist/hook-escape.js +7 -16
- package/plugins/kimi-codex/dist/hooks/approval-hook.js +1766 -87
- package/plugins/kimi-codex/dist/hooks/approval-policy.js +86 -19
- package/plugins/kimi-codex/dist/hooks/config-safety.js +31 -64
- package/plugins/kimi-codex/dist/hooks/hook-timing.js +48 -0
- package/plugins/kimi-codex/dist/hooks/install-paths.js +179 -107
- package/plugins/kimi-codex/dist/hooks/install.js +126 -53
- package/plugins/kimi-codex/dist/hooks/managed-block.js +121 -127
- package/plugins/kimi-codex/dist/job-store.js +206 -166
- package/plugins/kimi-codex/dist/jobs.js +66 -19
- package/plugins/kimi-codex/dist/kimi-command.js +74 -1
- package/plugins/kimi-codex/dist/kimi-engine.js +198 -127
- package/plugins/kimi-codex/dist/kimi-errors.js +15 -70
- package/plugins/kimi-codex/dist/kimi-home.js +6 -0
- package/plugins/kimi-codex/dist/kimi-journal.js +42 -0
- package/plugins/kimi-codex/dist/kimi-releases.js +123 -0
- package/plugins/kimi-codex/dist/kimi-timeouts.js +2 -16
- package/plugins/kimi-codex/dist/kimi-version-probe.js +24 -108
- package/plugins/kimi-codex/dist/logging.js +12 -7
- package/plugins/kimi-codex/dist/mcp/binding.js +13 -4
- package/plugins/kimi-codex/dist/mcp/job-control.js +390 -95
- package/plugins/kimi-codex/dist/mcp/launcher.js +13 -7
- package/plugins/kimi-codex/dist/mcp/operations.js +405 -179
- package/plugins/kimi-codex/dist/mcp/protocol.js +124 -33
- package/plugins/kimi-codex/dist/mcp/skills.js +130 -0
- package/plugins/kimi-codex/dist/mcp/stdio.js +18 -4
- package/plugins/kimi-codex/dist/model-command.js +5 -3
- package/plugins/kimi-codex/dist/native-v2-preflight.js +243 -80
- package/plugins/kimi-codex/dist/parsing.js +211 -243
- package/plugins/kimi-codex/dist/paths.js +28 -10
- package/plugins/kimi-codex/dist/plugin-data.js +28 -83
- package/plugins/kimi-codex/dist/process-tree.js +35 -24
- package/plugins/kimi-codex/dist/read-scope.js +435 -0
- package/plugins/kimi-codex/dist/render.js +58 -46
- package/plugins/kimi-codex/dist/rescue-approval.js +461 -84
- package/plugins/kimi-codex/dist/session-references.js +216 -0
- package/plugins/kimi-codex/dist/session-title.js +26 -6
- package/plugins/kimi-codex/dist/stream-json.js +1 -3
- package/plugins/kimi-codex/dist/surface-routing.js +108 -0
- package/plugins/kimi-codex/dist/swarm-activation.js +74 -188
- package/plugins/kimi-codex/dist/swarm-policy.js +2 -1
- package/plugins/kimi-codex/dist/swarm-recovery.js +2 -1
- package/plugins/kimi-codex/dist/util.js +28 -0
- package/plugins/kimi-codex/dist/version.js +1 -1
- package/plugins/kimi-codex/scripts/companion.sh +4 -15
- package/plugins/kimi-codex/skills/kimi/SKILL.md +77 -0
- package/plugins/kimi-codex/skills/kimi/agents/openai.yaml +6 -0
- package/scripts/companion.sh +4 -15
- package/skills/kimi/SKILL.md +77 -0
- package/skills/kimi/agents/openai.yaml +6 -0
- package/CHANGELOG.md +0 -1333
- package/agents/kimi-ask.md +0 -89
- package/agents/kimi-challenge.md +0 -86
- package/agents/kimi-pursue.md +0 -93
- package/agents/kimi-rescue.md +0 -92
- package/agents/kimi-review.md +0 -86
- package/agents/kimi-swarm-write.md +0 -96
- package/agents/kimi-swarm.md +0 -86
- package/commands/README.md +0 -16
- package/commands/ask.md +0 -38
- package/commands/cancel.md +0 -17
- package/commands/challenge.md +0 -35
- package/commands/pursue.md +0 -41
- package/commands/replay.md +0 -13
- package/commands/rescue.md +0 -38
- package/commands/result.md +0 -13
- package/commands/review.md +0 -35
- package/commands/setup.md +0 -23
- package/commands/status.md +0 -13
- package/commands/swarm.md +0 -44
- package/dist/commands/not-implemented.js +0 -4
- package/dist/commands/review-gate.js +0 -390
- package/dist/config.js +0 -22
- package/dist/dsh/companion.js +0 -177
- package/dist/dsh/index.js +0 -169
- package/dist/hooks/review-gate-stop.js +0 -19
- package/dist/schemas/review-gate-output.js +0 -43
- package/docs/registry-releases.md +0 -228
- package/docs/upstream-2.4.1-certification.md +0 -54
- package/docs/upstream-2.5.0-certification.md +0 -52
- package/docs/upstream-2.5.1-certification.md +0 -47
- package/docs/upstream-2.5.2-certification.md +0 -40
- package/docs/upstream-2.5.3-certification.md +0 -73
- package/docs/upstream-2.6.0-certification.md +0 -65
- package/docs/upstream-2.6.2-certification.md +0 -144
- package/docs/upstream-2.6.3-certification.md +0 -100
- package/docs/upstream-2.7.2-certification.md +0 -113
- package/docs/upstream-2.7.3-certification.md +0 -83
- package/docs/windows-validation.md +0 -39
- package/hooks/README.md +0 -9
- package/hooks/hooks.json +0 -16
- package/plugins/kimi-codex/dist/commands/not-implemented.js +0 -4
- package/plugins/kimi-codex/dist/commands/review-gate.js +0 -390
- package/plugins/kimi-codex/dist/config.js +0 -22
- package/plugins/kimi-codex/dist/dsh/companion.js +0 -177
- package/plugins/kimi-codex/dist/dsh/index.js +0 -169
- package/plugins/kimi-codex/dist/hooks/review-gate-stop.js +0 -19
- package/plugins/kimi-codex/dist/schemas/review-gate-output.js +0 -43
- package/plugins/kimi-codex/scripts/review-gate-hook.sh +0 -32
- package/plugins/kimi-codex/skills/kimi-ask/SKILL.md +0 -35
- package/plugins/kimi-codex/skills/kimi-ask/agents/openai.yaml +0 -6
- package/plugins/kimi-codex/skills/kimi-cancel/SKILL.md +0 -25
- package/plugins/kimi-codex/skills/kimi-cancel/agents/openai.yaml +0 -6
- package/plugins/kimi-codex/skills/kimi-challenge/SKILL.md +0 -34
- package/plugins/kimi-codex/skills/kimi-challenge/agents/openai.yaml +0 -6
- package/plugins/kimi-codex/skills/kimi-pursue/SKILL.md +0 -32
- package/plugins/kimi-codex/skills/kimi-pursue/agents/openai.yaml +0 -6
- package/plugins/kimi-codex/skills/kimi-replay/SKILL.md +0 -25
- package/plugins/kimi-codex/skills/kimi-replay/agents/openai.yaml +0 -6
- package/plugins/kimi-codex/skills/kimi-rescue/SKILL.md +0 -34
- package/plugins/kimi-codex/skills/kimi-rescue/agents/openai.yaml +0 -6
- package/plugins/kimi-codex/skills/kimi-result/SKILL.md +0 -25
- package/plugins/kimi-codex/skills/kimi-result/agents/openai.yaml +0 -6
- package/plugins/kimi-codex/skills/kimi-review/SKILL.md +0 -34
- package/plugins/kimi-codex/skills/kimi-review/agents/openai.yaml +0 -6
- package/plugins/kimi-codex/skills/kimi-setup/SKILL.md +0 -34
- package/plugins/kimi-codex/skills/kimi-setup/agents/openai.yaml +0 -6
- package/plugins/kimi-codex/skills/kimi-status/SKILL.md +0 -25
- package/plugins/kimi-codex/skills/kimi-status/agents/openai.yaml +0 -6
- package/plugins/kimi-codex/skills/kimi-swarm/SKILL.md +0 -35
- package/plugins/kimi-codex/skills/kimi-swarm/agents/openai.yaml +0 -6
- package/plugins/kimi-codex/skills/kimi-swarm-write/SKILL.md +0 -36
- package/plugins/kimi-codex/skills/kimi-swarm-write/agents/openai.yaml +0 -6
- package/plugins/kimi-dsh/LICENSE +0 -201
- package/plugins/kimi-dsh/README.md +0 -83
- package/plugins/kimi-dsh/cordis.patch.yml +0 -45
- package/plugins/kimi-dsh/dist/background-spawn.js +0 -216
- package/plugins/kimi-dsh/dist/cli-cancellation.js +0 -43
- package/plugins/kimi-dsh/dist/cli-client.js +0 -1078
- package/plugins/kimi-dsh/dist/commands/ask.js +0 -336
- package/plugins/kimi-dsh/dist/commands/cancel.js +0 -216
- package/plugins/kimi-dsh/dist/commands/cli-helpers.js +0 -201
- package/plugins/kimi-dsh/dist/commands/models.js +0 -140
- package/plugins/kimi-dsh/dist/commands/not-implemented.js +0 -4
- package/plugins/kimi-dsh/dist/commands/pursue.js +0 -307
- package/plugins/kimi-dsh/dist/commands/recover-swarm.js +0 -140
- package/plugins/kimi-dsh/dist/commands/registry.js +0 -74
- package/plugins/kimi-dsh/dist/commands/repair-sessions.js +0 -160
- package/plugins/kimi-dsh/dist/commands/replay.js +0 -124
- package/plugins/kimi-dsh/dist/commands/rescue.js +0 -347
- package/plugins/kimi-dsh/dist/commands/result.js +0 -66
- package/plugins/kimi-dsh/dist/commands/review-gate.js +0 -390
- package/plugins/kimi-dsh/dist/commands/review.js +0 -220
- package/plugins/kimi-dsh/dist/commands/setup.js +0 -1129
- package/plugins/kimi-dsh/dist/commands/status.js +0 -27
- package/plugins/kimi-dsh/dist/commands/swarm.js +0 -849
- package/plugins/kimi-dsh/dist/commands/worker.js +0 -25
- package/plugins/kimi-dsh/dist/companion.js +0 -97
- package/plugins/kimi-dsh/dist/config.js +0 -22
- package/plugins/kimi-dsh/dist/dsh/companion.js +0 -177
- package/plugins/kimi-dsh/dist/dsh/index.js +0 -169
- package/plugins/kimi-dsh/dist/errors.js +0 -40
- package/plugins/kimi-dsh/dist/git.js +0 -224
- package/plugins/kimi-dsh/dist/help.js +0 -43
- package/plugins/kimi-dsh/dist/hook-escape.js +0 -71
- package/plugins/kimi-dsh/dist/hooks/approval-hook.js +0 -104
- package/plugins/kimi-dsh/dist/hooks/approval-policy.js +0 -233
- package/plugins/kimi-dsh/dist/hooks/config-safety.js +0 -665
- package/plugins/kimi-dsh/dist/hooks/install-paths.js +0 -428
- package/plugins/kimi-dsh/dist/hooks/install.js +0 -210
- package/plugins/kimi-dsh/dist/hooks/managed-block.js +0 -684
- package/plugins/kimi-dsh/dist/hooks/review-gate-stop.js +0 -19
- package/plugins/kimi-dsh/dist/job-id.js +0 -12
- package/plugins/kimi-dsh/dist/job-store.js +0 -659
- package/plugins/kimi-dsh/dist/jobs.js +0 -217
- package/plugins/kimi-dsh/dist/kimi-command.js +0 -71
- package/plugins/kimi-dsh/dist/kimi-engine.js +0 -675
- package/plugins/kimi-dsh/dist/kimi-errors.js +0 -260
- package/plugins/kimi-dsh/dist/kimi-home.js +0 -9
- package/plugins/kimi-dsh/dist/kimi-timeouts.js +0 -52
- package/plugins/kimi-dsh/dist/kimi-version-probe.js +0 -234
- package/plugins/kimi-dsh/dist/logging.js +0 -22
- package/plugins/kimi-dsh/dist/mcp/binding.js +0 -58
- package/plugins/kimi-dsh/dist/mcp/job-control.js +0 -345
- package/plugins/kimi-dsh/dist/mcp/launcher.js +0 -257
- package/plugins/kimi-dsh/dist/mcp/operations.js +0 -301
- package/plugins/kimi-dsh/dist/mcp/protocol.js +0 -275
- package/plugins/kimi-dsh/dist/mcp/server.js +0 -8
- package/plugins/kimi-dsh/dist/mcp/stdio.js +0 -78
- package/plugins/kimi-dsh/dist/mcp/supervised-child.js +0 -15
- package/plugins/kimi-dsh/dist/mcp/tool-result.js +0 -7
- package/plugins/kimi-dsh/dist/mcp/workspace.js +0 -34
- package/plugins/kimi-dsh/dist/model-command.js +0 -32
- package/plugins/kimi-dsh/dist/native-v2-preflight.js +0 -525
- package/plugins/kimi-dsh/dist/package.json +0 -1
- package/plugins/kimi-dsh/dist/parsing.js +0 -620
- package/plugins/kimi-dsh/dist/paths.js +0 -27
- package/plugins/kimi-dsh/dist/plugin-data.js +0 -98
- package/plugins/kimi-dsh/dist/process-tree.js +0 -586
- package/plugins/kimi-dsh/dist/prompt-size.js +0 -18
- package/plugins/kimi-dsh/dist/render.js +0 -177
- package/plugins/kimi-dsh/dist/rescue-approval.js +0 -865
- package/plugins/kimi-dsh/dist/schemas/review-gate-output.js +0 -43
- package/plugins/kimi-dsh/dist/session-recovery.js +0 -202
- package/plugins/kimi-dsh/dist/session-title.js +0 -293
- package/plugins/kimi-dsh/dist/stream-json.js +0 -346
- package/plugins/kimi-dsh/dist/swarm-activation.js +0 -1197
- package/plugins/kimi-dsh/dist/swarm-policy.js +0 -73
- package/plugins/kimi-dsh/dist/swarm-recovery.js +0 -165
- package/plugins/kimi-dsh/dist/swarm-tool-policy.js +0 -146
- package/plugins/kimi-dsh/dist/types.js +0 -1
- package/plugins/kimi-dsh/dist/vendor/shell-quote/LICENSE +0 -24
- package/plugins/kimi-dsh/dist/vendor/shell-quote/index.js +0 -1
- package/plugins/kimi-dsh/dist/vendor/shell-quote/parse.js +0 -229
- package/plugins/kimi-dsh/dist/vendor/smol-toml/LICENSE +0 -24
- package/plugins/kimi-dsh/dist/vendor/smol-toml/date.js +0 -156
- package/plugins/kimi-dsh/dist/vendor/smol-toml/error.js +0 -67
- package/plugins/kimi-dsh/dist/vendor/smol-toml/extract.js +0 -293
- package/plugins/kimi-dsh/dist/vendor/smol-toml/parse.js +0 -164
- package/plugins/kimi-dsh/dist/vendor/smol-toml/primitive.js +0 -151
- package/plugins/kimi-dsh/dist/vendor/smol-toml/struct.js +0 -156
- package/plugins/kimi-dsh/dist/vendor/smol-toml/util.js +0 -57
- package/plugins/kimi-dsh/dist/version.js +0 -7
- package/plugins/kimi-dsh/package.json +0 -78
- package/plugins/kimi-dsh/scripts/companion.sh +0 -37
- package/plugins/kimi-dsh/scripts/review-gate-hook.sh +0 -32
- package/scripts/review-gate-hook.sh +0 -32
package/README.md
CHANGED
|
@@ -1,77 +1,68 @@
|
|
|
1
|
-
# Kimi for Claude Code, Codex,
|
|
1
|
+
# Kimi for Claude Code, Codex, Antigravity, DeepSeek Harness, and Magpie
|
|
2
2
|
|
|
3
|
-
[](https://github.com/linxule/kimi-plugin-cc/releases/latest) [](https://github.com/linxule/kimi-plugin-cc/releases/latest) [](https://github.com/linxule/kimi-plugin-cc/actions/workflows/ci.yml) [](./LICENSE)
|
|
4
4
|
|
|
5
|
-
Use Kimi
|
|
5
|
+
Use Kimi from Claude Code, Codex, Antigravity, DeepSeek Harness (DSH), or Magpie. You can ask questions, review changes, challenge designs, fix files, or run parallel tasks. One package gives every host the same 4 MCP tools, one `kimi` skill, one shared data directory, and one PreToolUse safety hook.
|
|
6
6
|
|
|
7
|
-
[](https://www.kimi.ai/lp/kimi-ambassador)
|
|
8
8
|
|
|
9
|
-
I
|
|
9
|
+
I am a [Kimi Ambassador](https://www.kimi.ai/lp/kimi-ambassador) (academia). Kimi (Moonshot AI) supports this project through that role.
|
|
10
10
|
|
|
11
|
-
[Latest release](https://github.com/linxule/kimi-plugin-cc/releases/latest) · [npm package](https://www.npmjs.com/package/kimi-plugin-cc) · [
|
|
11
|
+
[Latest release](https://github.com/linxule/kimi-plugin-cc/releases/latest) · [npm package](https://www.npmjs.com/package/kimi-plugin-cc) · [Migration guide](./docs/migration.md) · [Report an issue](https://github.com/linxule/kimi-plugin-cc/issues) · [Apache-2.0 license](./LICENSE)
|
|
12
12
|
|
|
13
|
-

|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-

|
|
18
|
-
|
|
19
|
-
*Codex runs `$kimi-ask` — a read-only explanation of this project's entry point, from the entry shell script to the command modules.*
|
|
15
|
+
Claude Code reviews this repository with Kimi and checks each finding against the working tree.
|
|
20
16
|
|
|
21
17
|
Choose a language below. Each guide opens on this page.
|
|
22
18
|
|
|
23
19
|
选择语言,展开阅读 · Choisissez votre langue · 言語を選んで開いてください
|
|
24
20
|
|
|
25
21
|
<details open>
|
|
26
|
-
<summary>English
|
|
22
|
+
<summary>English: get started</summary>
|
|
27
23
|
|
|
28
24
|
## Use Kimi in your coding tasks
|
|
29
25
|
|
|
30
|
-
|
|
26
|
+
Send questions, code reviews, design challenges, workspace fixes, multi-step goals, and parallel swarms to your local Kimi Code CLI. You can call Kimi from Claude Code, Codex, Antigravity, DeepSeek Harness (DSH), or Magpie.
|
|
31
27
|
|
|
32
|
-
The plugin runs
|
|
28
|
+
The plugin runs Kimi on your machine with your own Kimi subscription or API key. It never changes your host login. Your Kimi provider receives only the prompts and code that each task reads.
|
|
33
29
|
|
|
34
|
-
|
|
30
|
+
Read-only tasks cannot edit files or run shell commands. Write tasks edit files only inside your workspace or a temporary Git worktree, and they never change Git history.
|
|
35
31
|
|
|
36
32
|
## Before you install
|
|
37
33
|
|
|
38
34
|
You need:
|
|
39
35
|
|
|
40
36
|
- macOS or Linux
|
|
41
|
-
- Claude Code, Codex,
|
|
37
|
+
- Claude Code, Codex, Antigravity, DSH `>=0.2.1-rc.5 <0.3.0`, or Magpie (or any stdio MCP client)
|
|
42
38
|
- Node.js 22.5 or newer (24.9 or newer for DSH)
|
|
43
|
-
- Kimi Code CLI 2.
|
|
44
|
-
|
|
45
|
-
Windows is not currently supported. Contributors can help with the [no-model Windows diagnostics checks](./docs/windows-validation.md). Check your versions in a terminal:
|
|
39
|
+
- Kimi Code CLI `2.8.0` or newer (this plugin certifies `2.8.0` for all 7 operations and refuses older versions)
|
|
46
40
|
|
|
47
|
-
|
|
48
|
-
node --version
|
|
49
|
-
kimi --version
|
|
50
|
-
```
|
|
41
|
+
This plugin does not support model runs on Windows. Contributors can run the [Windows diagnostics checks](./docs/ci.md#windows-spawn-controls).
|
|
51
42
|
|
|
52
|
-
|
|
43
|
+
Install Kimi Code with the [Kimi Code getting started guide](https://www.kimi.com/code/docs/en/kimi-code-cli/getting-started), or let `kimi_setup` install a certified `2.8.0` binary for you. You do not need Bun or a build step.
|
|
53
44
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
Run `kimi` in your terminal. Use `/login` for a Kimi subscription, or `/provider` to set up an API provider. Enter credentials in Kimi, never in the assistant conversation. Exit Kimi when you finish setup. If you set `KIMI_CODE_HOME`, use the same location for Kimi and the plugin.
|
|
45
|
+
Run `kimi` in your terminal, then use `/login` for a Kimi subscription or `/provider` for an API key. Enter credentials only in Kimi, never in an assistant chat. If you set `KIMI_CODE_HOME`, use the same directory for Kimi and this plugin.
|
|
57
46
|
|
|
58
47
|
## Install in Claude Code
|
|
59
48
|
|
|
60
|
-
|
|
49
|
+
Run these commands in Claude Code inside your project:
|
|
61
50
|
|
|
62
51
|
```text
|
|
63
52
|
/plugin marketplace add linxule/kimi-plugin-cc
|
|
64
53
|
/plugin install kimi@kimi-marketplace
|
|
65
|
-
/kimi:setup
|
|
66
|
-
/kimi:setup --check
|
|
67
54
|
```
|
|
68
55
|
|
|
69
|
-
|
|
56
|
+
Claude Code loads the `kimi` MCP server from `.mcp.json` and the `skills/kimi/SKILL.md` skill automatically. Ask Claude to install and check the safety hook:
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
Run kimi_setup with action "install", then action "check".
|
|
60
|
+
```
|
|
70
61
|
|
|
71
|
-
|
|
62
|
+
Check that the `Probe:` line shows `ok`. Then try a read-only question:
|
|
72
63
|
|
|
73
64
|
```text
|
|
74
|
-
|
|
65
|
+
Use Kimi to explain how this project's main entry point works.
|
|
75
66
|
```
|
|
76
67
|
|
|
77
68
|
## Install in Codex
|
|
@@ -83,856 +74,778 @@ codex plugin marketplace add linxule/kimi-plugin-cc
|
|
|
83
74
|
codex plugin add kimi@kimi-marketplace
|
|
84
75
|
```
|
|
85
76
|
|
|
86
|
-
Open a new Codex task in your project
|
|
77
|
+
Open a new Codex task in your project and send this prompt:
|
|
87
78
|
|
|
88
79
|
```text
|
|
89
|
-
Use $kimi
|
|
80
|
+
Use $kimi to run kimi_setup (install, then check), then explain how this project's main entry point works.
|
|
90
81
|
```
|
|
91
82
|
|
|
92
|
-
|
|
83
|
+
## Install in Antigravity
|
|
93
84
|
|
|
94
|
-
|
|
95
|
-
|
|
85
|
+
Link or copy the repository root into the Antigravity plugins directory. The root includes `plugin.json`, `mcp_config.json`, `assets/logo.svg`, and `skills/kimi/SKILL.md`:
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
ln -sfn /path/to/kimi-plugin-cc ~/.gemini/config/plugins/kimi
|
|
96
89
|
```
|
|
97
90
|
|
|
98
|
-
|
|
91
|
+
Restart Antigravity or reload its plugins. Then ask Antigravity to run `kimi_setup` with `action: "install"` and `action: "check"`.
|
|
99
92
|
|
|
100
93
|
## Install in DeepSeek Harness
|
|
101
94
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
The DSH bundle provides the same seven operations as the other hosts: `kimi_ask`, `kimi_review`, `kimi_challenge`, `kimi_rescue`, `kimi_pursue`, `kimi_swarm`, and `kimi_swarm_write`. They use the same companion runtime, safety hooks, jobs, budgets, and artifacts. Rescue and pursue edit the selected workspace; swarm-write returns a patch without applying or committing it.
|
|
95
|
+
Update your DSH host and profile dependencies to `zod >=4.6.6` and `undici >=8.12.2` before installing the plugin. Follow the [patched DSH host and profiles guide](./docs/safety.md#patched-dsh-host-and-profiles) first.
|
|
105
96
|
|
|
106
|
-
|
|
97
|
+
Install the root package from npm or a local checkout. DSH loads `cordis.patch.yml` from the root with `@deepseek-ai/dsh-mcp-client` and `@deepseek-ai/dsh-skill-filesystem`:
|
|
107
98
|
|
|
108
99
|
```sh
|
|
109
|
-
dsh plugin --profile web add
|
|
100
|
+
dsh plugin --profile web add kimi-plugin-cc
|
|
110
101
|
```
|
|
111
102
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
For DSH Discover, enable **Custom plugin indexes** and add `https://raw.githubusercontent.com/linxule/kimi-plugin-cc/main/dsh/index.json` as an index source.
|
|
115
|
-
|
|
116
|
-
Restart DSH when requested, then run `/kimi-setup` and `/kimi-setup --check`. Ask DSH to use one of the seven tools with a self-contained task. Job controls are `/kimi-status`, `/kimi-result`, and `/kimi-cancel`. `/kimi-setup --models` lists configured models, and `/kimi-setup --uninstall` removes only the DSH hook.
|
|
117
|
-
|
|
118
|
-
DSH requires Node.js 24.9 or newer and DSH `>=0.2.1-rc.5 <0.3.0`. See the [DSH bundle guide](./plugins/kimi-dsh/README.md) for profile-level model, thinking, budget, review-base, and other configuration.
|
|
119
|
-
|
|
120
|
-
## npm distribution (optional)
|
|
103
|
+
To install from a local checkout, run `dsh plugin --profile web add .` instead. For DSH Discover, turn on custom plugin indexes and add `https://raw.githubusercontent.com/linxule/kimi-plugin-cc/main/dsh/index.json`. Restart DSH, then run `kimi_setup` with `install` and `check`.
|
|
121
104
|
|
|
122
|
-
|
|
123
|
-
Codex. Published releases are also available as
|
|
124
|
-
[`kimi-plugin-cc` on npm](https://www.npmjs.com/package/kimi-plugin-cc), including
|
|
125
|
-
all three compiled plugin distributions. No Bun, TypeScript, or install scripts are
|
|
126
|
-
needed to use the package. Kimi Code CLI and Node are still prerequisites.
|
|
105
|
+
## Install in Magpie and other MCP clients
|
|
127
106
|
|
|
128
|
-
|
|
107
|
+
Register `scripts/companion.sh mcp` as a local stdio MCP server for agents such as Copilot, Cursor, and Grok:
|
|
129
108
|
|
|
130
109
|
```sh
|
|
131
|
-
|
|
132
|
-
claude --plugin-dir ~/.local/share/kimi-plugin-cc/node_modules/kimi-plugin-cc
|
|
110
|
+
magpie library mcp add kimi /path/to/kimi-plugin-cc/scripts/companion.sh mcp agents=copilot,cursor,grok --local
|
|
133
111
|
```
|
|
134
112
|
|
|
135
|
-
|
|
136
|
-
one installation of the plugin per host; do not load the local copy alongside
|
|
137
|
-
an enabled marketplace copy. The package is a plugin, not a replacement for the
|
|
138
|
-
upstream `kimi` executable, and does not expose an `npx kimi-plugin-cc` command.
|
|
113
|
+
Do not add `claude`, `codex`, `antigravity`, or `dsh` in Magpie when they load the Kimi plugin directly, so the server name does not collide.
|
|
139
114
|
|
|
140
|
-
|
|
141
|
-
restart the session, and run setup/check again. Codex users should continue to
|
|
142
|
-
use the GitHub marketplace instructions above. Maintainers: see
|
|
143
|
-
[registry releases](./docs/registry-releases.md).
|
|
115
|
+
Run `/path/to/kimi-plugin-cc/scripts/companion.sh setup` and `setup --check` once in your terminal, or call `kimi_setup` from the agent.
|
|
144
116
|
|
|
145
|
-
##
|
|
117
|
+
## Install from npm
|
|
146
118
|
|
|
147
|
-
|
|
148
|
-
| --- | --- | --- | --- |
|
|
149
|
-
| Explain code | `/kimi:ask` | `$kimi-ask` | Read-only |
|
|
150
|
-
| Review code changes | `/kimi:review` | `$kimi-review` | Read-only |
|
|
151
|
-
| Challenge a design or approach | `/kimi:challenge` | `$kimi-challenge` | Read-only |
|
|
152
|
-
| Make a focused fix | `/kimi:rescue` | `$kimi-rescue` | Can edit your project |
|
|
153
|
-
| Review several areas at once | `/kimi:swarm` | `$kimi-swarm` | Read-only |
|
|
154
|
-
| Prepare edits in parallel | `/kimi:swarm --write` | `$kimi-swarm-write` | Only in a temporary Git worktree; returns a patch for you to apply |
|
|
155
|
-
| Work toward a goal over several turns | `/kimi:pursue` | `$kimi-pursue` | Can edit your project; experimental |
|
|
119
|
+
You can also install [`kimi-plugin-cc` from npm](https://www.npmjs.com/package/kimi-plugin-cc) into a dedicated package directory. Keep that directory separate from `~/.local/share/kimi-plugin-cc`, which stores shared runtime data:
|
|
156
120
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
Claude Code also has an optional [review gate](./commands/setup.md). It checks work when Claude finishes a turn and is off by default.
|
|
162
|
-
|
|
163
|
-
## View sessions in Kimi
|
|
164
|
-
|
|
165
|
-
Plugin sessions use the shared Kimi Code Desktop and `kimi web` history. New native-v2 sessions receive a readable fallback title that Kimi can replace with a generated title. Manual renames are preserved. For missing older sessions and the native **Gen Title** action, see [session visibility and titles](./docs/session-visibility.md).
|
|
166
|
-
|
|
167
|
-
## Choose a model
|
|
168
|
-
|
|
169
|
-
New Kimi sessions use your configured default model. You only need to choose a model if you want a different one.
|
|
170
|
-
|
|
171
|
-
In Claude Code, run `/kimi:setup --models`. In Codex, ask `$kimi-setup` to list configured models. This reads your local model list. It does not contact providers or test credentials. A listed model can still fail because of authentication, access, or tool support.
|
|
172
|
-
|
|
173
|
-
Copy a model alias from the list. Replace `provider/model` with that alias:
|
|
174
|
-
|
|
175
|
-
```text
|
|
176
|
-
/kimi:review -m 'provider/model' Check error handling in this diff.
|
|
121
|
+
```sh
|
|
122
|
+
npm install --prefix ~/.local/share/kimi-plugin-cc-pkg kimi-plugin-cc@3.1.0
|
|
123
|
+
claude --plugin-dir ~/.local/share/kimi-plugin-cc-pkg/node_modules/kimi-plugin-cc
|
|
177
124
|
```
|
|
178
125
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
To test a listed model, run a small task with its alias. This makes a provider call under your account.
|
|
126
|
+
Do not load an npm copy alongside an enabled marketplace copy in the same host. Maintainers can read the [npm publishing guide](./docs/ci.md#npm-oidc-publishing).
|
|
182
127
|
|
|
183
|
-
|
|
128
|
+
## Use Kimi with MCP
|
|
184
129
|
|
|
185
|
-
|
|
130
|
+
Every host shares the same 4 MCP tools and full `SEP-2640` skill discovery (`skills/list`, `skills/get`, `resources/list`, and `resources/read` for `skill://kimi/SKILL.md` and `skill://kimi/agents/openai.yaml`):
|
|
186
131
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
Use these commands to follow a task:
|
|
190
|
-
|
|
191
|
-
| Action | Claude Code command | Codex skill |
|
|
132
|
+
| Tool | Modes or actions | Can it write files |
|
|
192
133
|
| --- | --- | --- |
|
|
193
|
-
|
|
|
194
|
-
|
|
|
195
|
-
|
|
|
134
|
+
| `kimi_read` | `mode`: `ask` (default), `review`, `challenge`, `swarm` | No |
|
|
135
|
+
| `kimi_write` | `mode`: `rescue` (default), `pursue`, `swarm_patch` | Workspace files only (`swarm_patch` returns an unapplied worktree patch), never Git |
|
|
136
|
+
| `kimi_job` | `action`: `list`, `status`, `result`, `wait`, `cancel`, `replay`, `recover_swarm` | No (stops jobs or saves recovery patches) |
|
|
137
|
+
| `kimi_setup` | `action`: `check` (default), `models`, `install`, `install_kimi`, `repair_sessions` | Updates `~/.kimi-code/config.toml` hook block, plugin-owned CLI, or session previews |
|
|
196
138
|
|
|
197
|
-
|
|
139
|
+
Standard `tools/call` requests on `kimi_read` and `kimi_write` wait up to 50 seconds by default (`wait: true`) and return the answer directly. You can raise `wait_timeout_ms` up to `86400000` milliseconds (24 hours). If the client disconnects or cancels the wait, polling stops while the Kimi job keeps running.
|
|
198
140
|
|
|
199
|
-
|
|
141
|
+
Set `wait: false` to get `{ job_id }` right away when you start parallel tasks. You can then check, wait on, or stop each job with `kimi_job`. Clients that support MCP `2026-07-28` tasks (`io.modelcontextprotocol/tasks`) receive native task handles for `tasks/get` and `tasks/cancel`.
|
|
200
142
|
|
|
201
|
-
|
|
143
|
+
Pass an absolute `workspace` path when your host does not set a default project directory. Always pass any `Warnings:` block back to the user.
|
|
202
144
|
|
|
203
|
-
|
|
145
|
+
## Use Kimi from the terminal
|
|
204
146
|
|
|
205
|
-
|
|
147
|
+
Run the 5 primary CLI subcommands through `scripts/companion.sh`:
|
|
206
148
|
|
|
207
|
-
|
|
149
|
+
| Command | What it does |
|
|
150
|
+
| --- | --- |
|
|
151
|
+
| `scripts/companion.sh read [--mode ask\|review\|challenge\|swarm] [options] [--] [prompt]` | Run a read-only question, diff review (`--base <ref>`), design challenge, or parallel read-only swarm |
|
|
152
|
+
| `scripts/companion.sh write [--mode rescue\|pursue\|swarm-patch] [options] [--] <prompt>` | Run a workspace fix, multi-step goal, or temporary worktree patch swarm |
|
|
153
|
+
| `scripts/companion.sh job <list\|status\|result\|wait\|cancel\|replay\|recover-swarm> [job-id]` | List, check, read, wait on, stop, replay, or recover jobs |
|
|
154
|
+
| `scripts/companion.sh setup [--check\|--uninstall\|--models\|--install-kimi\|--repair-sessions]` | Install or check the hook, list models, install certified Kimi `2.8.0`, or repair session previews |
|
|
155
|
+
| `scripts/companion.sh mcp` | Start the stdio MCP server |
|
|
208
156
|
|
|
209
|
-
|
|
210
|
-
- **Codex:** calls currently use ordinary MCP results, not native MCP tasks. After attachment, a running job returns a launch handle; an already settled job returns its terminal result. Use the three job-control tools to check, read, or cancel it.
|
|
157
|
+
Place `--mode` and other flags before `--` or the prompt text. Older subcommands such as `ask`, `review`, `task rescue`, `status`, `result`, and `cancel` still work as aliases.
|
|
211
158
|
|
|
212
|
-
|
|
159
|
+
## Point a task at an earlier session
|
|
213
160
|
|
|
214
|
-
|
|
161
|
+
Pass 1 to 8 earlier job IDs or Kimi session IDs with `referenced_sessions` in MCP or `--reference-session <id>` in the CLI. You can use session references on `ask`, `review`, `challenge`, `rescue`, `swarm`, and `swarm_patch`, but not on `pursue`:
|
|
215
162
|
|
|
216
|
-
|
|
163
|
+
```sh
|
|
164
|
+
scripts/companion.sh read --reference-session <job-id> -- Continue the migration from where that session stopped.
|
|
165
|
+
```
|
|
217
166
|
|
|
218
|
-
|
|
167
|
+
Kimi receives the path to each session's main log and reads only what it needs. When you set `read_roots` or `network`, the plugin adds each referenced session's `agents/main` directory to the allowed read roots. Combine session references with `network` only when those session logs may leave your machine.
|
|
219
168
|
|
|
220
|
-
|
|
169
|
+
## Limit what a task can read and reach
|
|
221
170
|
|
|
222
|
-
|
|
171
|
+
By default, read-only tasks can read any file your user account can read and cannot access the web. You can restrict `kimi_read` (`ask`, `review`, `challenge`, and `swarm`) and `companion.sh read` with 2 options:
|
|
223
172
|
|
|
224
|
-
|
|
173
|
+
- `read_roots` or `--read-root <abs-dir>` (repeatable) limits `Read`, `Grep`, `Glob`, and `ReadMediaFile` to the workspace and listed directories
|
|
174
|
+
- `network: true` or `--network` allows `WebSearch` and `FetchURL` to public hosts and limits the 4 read tools to the workspace and listed read roots
|
|
225
175
|
|
|
226
|
-
|
|
227
|
-
codex plugin marketplace upgrade kimi-marketplace
|
|
228
|
-
codex plugin add kimi@kimi-marketplace
|
|
229
|
-
```
|
|
176
|
+
Write tasks reject both options. Read and network limits apply to one run only and never carry over to resumed turns.
|
|
230
177
|
|
|
231
|
-
|
|
178
|
+
## Keep Kimi working when Kimi updates
|
|
232
179
|
|
|
233
|
-
|
|
180
|
+
Plugin 3.1.0 uses a rolling compatibility window starting at Kimi Code `2.8.0`:
|
|
234
181
|
|
|
235
|
-
|
|
182
|
+
- exact `2.8.0` runs all 7 operations
|
|
183
|
+
- unlisted plain `2.y.z` releases above `2.8.0` run `ask`, `review`, and `challenge` with a warning and `--environment local`
|
|
184
|
+
- unlisted plain `2.y.z` releases above `2.8.0` refuse write tasks, swarm tasks, and `--network` with `KIMI_CAPABILITY_NOT_CERTIFIED`
|
|
185
|
+
- releases below `2.8.0` refuse every operation
|
|
236
186
|
|
|
237
|
-
|
|
187
|
+
To keep all 7 operations working on a certified binary across every host, run `kimi_setup({ action: "install_kimi" })` or `scripts/companion.sh setup --install-kimi`. This is the only command that downloads files from the network. Jobs select `KIMI_PLUGIN_CC_KIMI_BIN` first, then `<data-dir>/kimi-bin/current` inside the shared data directory, and then `kimi` on `PATH`.
|
|
238
188
|
|
|
239
|
-
|
|
189
|
+
## Share one data directory and safety hook
|
|
240
190
|
|
|
241
|
-
|
|
191
|
+
All 5 hosts share one data directory (`<data-dir>`) and one bundled PreToolUse safety hook at `<data-dir>/hook/approval-hook.js`. The default data directory is `~/.local/share/kimi-plugin-cc` (or `$XDG_DATA_HOME/kimi-plugin-cc`) on macOS and Linux, and `%LOCALAPPDATA%\kimi-plugin-cc` on Windows. You can override the base directory with `KIMI_PLUGIN_CC_DATA` so data lives in `$KIMI_PLUGIN_CC_DATA/kimi-plugin-cc`.
|
|
242
192
|
|
|
243
|
-
|
|
193
|
+
Running `setup` once publishes the bundled hook and writes one `# === BEGIN kimi-plugin-cc-managed (v3.1.0) ===` block in `~/.kimi-code/config.toml`. It also replaces any older `:<host-id>` blocks from version 3.0. Hosts that use the same Node binary need only one setup run. If your hosts use different Node paths, point them to the same binary with `KIMI_PLUGIN_CC_NODE_BIN`.
|
|
244
194
|
|
|
245
|
-
|
|
195
|
+
## Manage sessions, models, and jobs
|
|
246
196
|
|
|
247
|
-
|
|
197
|
+
Sessions appear in Kimi Code Desktop and `kimi web` with your raw prompt as the preview. Run `kimi_setup({ action: "repair_sessions" })` or `scripts/companion.sh setup --repair-sessions [--apply] [--all]` to fix missing previews. Read [session visibility and titles](./docs/session-visibility.md) for details.
|
|
248
198
|
|
|
249
|
-
|
|
199
|
+
List your configured model aliases offline with `kimi_setup({ action: "models" })` or `scripts/companion.sh setup --models [--json]`. Pass `model` in MCP or `-m` in the CLI to pick a model for one run, or run `/model` inside `kimi` to change your default. Read [model selection](./docs/models.md) for details.
|
|
250
200
|
|
|
251
|
-
|
|
201
|
+
Track or stop jobs with `kimi_job` (`list`, `status`, `result`, `wait`, `cancel`, `replay`, and `recover_swarm`) or `scripts/companion.sh job`. Always stop jobs with `kimi_job` or `job cancel` instead of interrupting the host so `swarm_patch` can save its patch. Read [swarm recovery](./docs/swarm-recovery.md) for interrupted runs.
|
|
252
202
|
|
|
253
|
-
|
|
203
|
+
Run `scripts/companion.sh setup --uninstall` to remove the managed safety hook. If you are upgrading from version 3.0, follow [upgrading from 3.0 to 3.1](./docs/migration.md#upgrading-from-30-to-31).
|
|
254
204
|
|
|
255
|
-
|
|
205
|
+
## Understand the safety limits
|
|
256
206
|
|
|
257
|
-
|
|
207
|
+
One PreToolUse safety hook checks every Kimi tool call:
|
|
258
208
|
|
|
259
|
-
|
|
209
|
+
- read-only tasks deny file edits and shell commands
|
|
210
|
+
- write tasks edit files only inside your workspace and never change Git state
|
|
211
|
+
- `swarm_patch` edits files inside a temporary Git worktree off `HEAD` and returns an unapplied patch
|
|
260
212
|
|
|
261
|
-
|
|
213
|
+
The plugin does not:
|
|
262
214
|
|
|
263
|
-
|
|
215
|
+
- limit file reads unless you set `read_roots` or `network`
|
|
216
|
+
- check DNS resolution or HTTP redirects after `FetchURL` validates the written URL
|
|
217
|
+
- sandbox repository test runners started by write tasks
|
|
218
|
+
- apply patches or create Git commits
|
|
264
219
|
|
|
265
|
-
|
|
220
|
+
Run write tasks only in repositories you trust. For refusal codes and release history, see [safety and refusal codes](./docs/safety.md#native-v2-refusal-codes) and the [changelog](./CHANGELOG.md).
|
|
266
221
|
|
|
267
|
-
|
|
222
|
+
## Report issues and contribute
|
|
268
223
|
|
|
269
|
-
|
|
224
|
+
Report bugs or suggest changes in [GitHub issues](https://github.com/linxule/kimi-plugin-cc/issues). Contributors can read [runtime invariants](./docs/invariants.md) and [continuous integration details](./docs/ci.md).
|
|
270
225
|
|
|
271
226
|
</details>
|
|
272
227
|
|
|
273
228
|
<details>
|
|
274
|
-
<summary
|
|
229
|
+
<summary>简体中文:开始使用</summary>
|
|
275
230
|
|
|
276
|
-
##
|
|
231
|
+
## 在编码任务中使用 Kimi
|
|
277
232
|
|
|
278
|
-
|
|
233
|
+
你可以将代码提问、变更审查、设计质疑、工作区修复、多步目标和并行任务发送给本地 Kimi Code CLI。支持从 Claude Code、Codex、Antigravity、DeepSeek Harness(DSH)或 Magpie 直接调用 Kimi。
|
|
279
234
|
|
|
280
|
-
|
|
235
|
+
插件使用你自己的 Kimi 订阅或 API 密钥在本地运行 Kimi,绝不会改动宿主应用的登录状态。你的 Kimi 服务商只会收到当前任务读取的提示词和代码。
|
|
281
236
|
|
|
282
|
-
|
|
237
|
+
只读任务不能编辑文件或运行 shell 命令。写入任务只能在你的工作区或临时 Git 工作树内编辑文件,且绝不改动 Git 历史。
|
|
283
238
|
|
|
284
239
|
## 安装前准备
|
|
285
240
|
|
|
286
|
-
|
|
241
|
+
你需要准备以下环境:
|
|
287
242
|
|
|
288
243
|
- macOS 或 Linux
|
|
289
|
-
-
|
|
244
|
+
- Claude Code、Codex、Antigravity、DSH `>=0.2.1-rc.5 <0.3.0` 或 Magpie(或任何 stdio MCP 客户端)
|
|
290
245
|
- Node.js 22.5 或更高版本(DSH 需要 24.9 或更高版本)
|
|
291
|
-
- Kimi Code CLI 2.
|
|
292
|
-
|
|
293
|
-
目前不支持 Windows。在终端检查版本:
|
|
294
|
-
|
|
295
|
-
```sh
|
|
296
|
-
node --version
|
|
297
|
-
kimi --version
|
|
298
|
-
```
|
|
246
|
+
- Kimi Code CLI `2.8.0` 或更高版本(本插件对 `2.8.0` 认证了全部 7 项操作,并拒绝更早版本)
|
|
299
247
|
|
|
300
|
-
|
|
248
|
+
Windows 不支持运行模型任务。贡献者可以运行 [Windows 诊断检查](./docs/ci.md#windows-spawn-controls)。
|
|
301
249
|
|
|
302
|
-
|
|
250
|
+
你可以按照 [Kimi Code 入门指南](https://www.kimi.com/code/docs/en/kimi-code-cli/getting-started) 安装 Kimi Code,也可以让 `kimi_setup` 自动安装已认证的 `2.8.0` 二进制文件。无需安装 Bun,也无需执行构建步骤。
|
|
303
251
|
|
|
304
|
-
|
|
252
|
+
先在终端运行 `kimi`,使用 `/login` 登录 Kimi 订阅,或使用 `/provider` 配置 API 密钥。请只在 Kimi 终端中输入凭据,切勿在助手对话中粘贴密钥。如果设置了 `KIMI_CODE_HOME`,请确保 Kimi 和本插件使用同一个目录。
|
|
305
253
|
|
|
306
254
|
## 在 Claude Code 中安装
|
|
307
255
|
|
|
308
|
-
|
|
256
|
+
在项目目录中打开 Claude Code 并运行:
|
|
309
257
|
|
|
310
258
|
```text
|
|
311
259
|
/plugin marketplace add linxule/kimi-plugin-cc
|
|
312
260
|
/plugin install kimi@kimi-marketplace
|
|
313
|
-
/kimi:setup
|
|
314
|
-
/kimi:setup --check
|
|
315
261
|
```
|
|
316
262
|
|
|
317
|
-
|
|
263
|
+
Claude Code 会自动加载 `.mcp.json` 中的 `kimi` MCP 服务器和 `skills/kimi/SKILL.md` 技能。让 Claude 安装并检查安全钩子:
|
|
264
|
+
|
|
265
|
+
```text
|
|
266
|
+
Run kimi_setup with action "install", then action "check".
|
|
267
|
+
```
|
|
318
268
|
|
|
319
|
-
|
|
269
|
+
确认输出中的 `Probe:` 行显示 `ok`,然后尝试一个只读提问:
|
|
320
270
|
|
|
321
271
|
```text
|
|
322
|
-
|
|
272
|
+
Use Kimi to explain how this project's main entry point works.
|
|
323
273
|
```
|
|
324
274
|
|
|
325
275
|
## 在 Codex 中安装
|
|
326
276
|
|
|
327
|
-
|
|
277
|
+
在终端中运行以下命令:
|
|
328
278
|
|
|
329
279
|
```sh
|
|
330
280
|
codex plugin marketplace add linxule/kimi-plugin-cc
|
|
331
281
|
codex plugin add kimi@kimi-marketplace
|
|
332
282
|
```
|
|
333
283
|
|
|
334
|
-
在项目中打开一个新的 Codex
|
|
335
|
-
|
|
336
|
-
```text
|
|
337
|
-
使用 $kimi-setup 安装安全钩子,然后检查配置是否可用。
|
|
338
|
-
```
|
|
339
|
-
|
|
340
|
-
钩子会按插件规则检查 Kimi 的工具调用。检查结果中,`Probe:` 一行应显示 `ok`。如果失败,请参照下方的安装问题处理说明。然后试着输入:
|
|
284
|
+
在项目中打开一个新的 Codex 任务并发送:
|
|
341
285
|
|
|
342
286
|
```text
|
|
343
|
-
|
|
287
|
+
Use $kimi to run kimi_setup (install, then check), then explain how this project's main entry point works.
|
|
344
288
|
```
|
|
345
289
|
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
## 在 DeepSeek Harness(DSH)中安装
|
|
349
|
-
|
|
350
|
-
DSH 宿主及各配置所用的依赖需要修补(`zod >=4.6.6`、`undici >=8.12.2`)。安装插件前,请按[宿主安装与审计说明](./docs/registry-releases.md#patched-dsh-host-and-profiles)操作。
|
|
351
|
-
|
|
352
|
-
DSH 与其他宿主一样提供七类操作:`kimi_ask`、`kimi_review`、`kimi_challenge`、`kimi_rescue`、`kimi_pursue`、`kimi_swarm` 和 `kimi_swarm_write`。它们使用同一套 companion 运行时、安全钩子、任务记录、预算和产物。Rescue 和 pursue 会修改所选工作区;swarm-write 只返回补丁,不会应用或提交它。
|
|
290
|
+
## 在 Antigravity 中安装
|
|
353
291
|
|
|
354
|
-
|
|
292
|
+
将仓库根目录软链接或复制到 Antigravity 的插件目录。根目录包含 `plugin.json`、`mcp_config.json`、`assets/logo.svg` 和 `skills/kimi/SKILL.md`:
|
|
355
293
|
|
|
356
294
|
```sh
|
|
357
|
-
|
|
295
|
+
ln -sfn /path/to/kimi-plugin-cc ~/.gemini/config/plugins/kimi
|
|
358
296
|
```
|
|
359
297
|
|
|
360
|
-
|
|
298
|
+
重启 Antigravity 或重新加载插件,然后让 Antigravity 调用 `kimi_setup`(先运行 `action: "install"`,再运行 `action: "check"`)。
|
|
361
299
|
|
|
362
|
-
|
|
300
|
+
## 在 DeepSeek Harness 中安装
|
|
363
301
|
|
|
364
|
-
DSH
|
|
302
|
+
安装插件前,请先将 DSH 宿主与配置文件依赖更新到 `zod >=4.6.6` 和 `undici >=8.12.2`。请先按照 [DSH 宿主与配置补丁指南](./docs/safety.md#patched-dsh-host-and-profiles) 完成更新。
|
|
365
303
|
|
|
366
|
-
|
|
304
|
+
从 npm 或本地检出安装根包。DSH 会通过 `@deepseek-ai/dsh-mcp-client` 和 `@deepseek-ai/dsh-skill-filesystem` 直接加载根目录下的 `cordis.patch.yml`:
|
|
367
305
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
306
|
+
```sh
|
|
307
|
+
dsh plugin --profile web add kimi-plugin-cc
|
|
308
|
+
```
|
|
371
309
|
|
|
372
|
-
|
|
373
|
-
| --- | --- | --- | --- |
|
|
374
|
-
| 解释代码 | `/kimi:ask` | `$kimi-ask` | 只读 |
|
|
375
|
-
| 审查代码修改 | `/kimi:review` | `$kimi-review` | 只读 |
|
|
376
|
-
| 检查设计或方案中的问题 | `/kimi:challenge` | `$kimi-challenge` | 只读 |
|
|
377
|
-
| 完成一项范围明确的修复 | `/kimi:rescue` | `$kimi-rescue` | 可以修改项目文件 |
|
|
378
|
-
| 同时审查多个部分 | `/kimi:swarm` | `$kimi-swarm` | 只读 |
|
|
379
|
-
| 并行准备修改 | `/kimi:swarm --write` | `$kimi-swarm-write` | 只在临时 Git 工作树中修改,返回补丁,由你决定是否应用 |
|
|
380
|
-
| 通过多轮任务推进目标 | `/kimi:pursue` | `$kimi-pursue` | 可以修改项目文件,属于实验性功能 |
|
|
310
|
+
若从本地检出安装,请改用 `dsh plugin --profile web add .`。如果使用 DSH Discover,请开启自定义插件索引并添加 `https://raw.githubusercontent.com/linxule/kimi-plugin-cc/main/dsh/index.json`。重启 DSH 后,调用 `kimi_setup` 执行 `install` 和 `check`。
|
|
381
311
|
|
|
382
|
-
|
|
312
|
+
## 在 Magpie 和其他 MCP 客户端中安装
|
|
383
313
|
|
|
384
|
-
|
|
314
|
+
将 `scripts/companion.sh mcp` 注册为本地 stdio MCP 服务器,供 Copilot、Cursor 和 Grok 等代理调用:
|
|
385
315
|
|
|
386
|
-
|
|
316
|
+
```sh
|
|
317
|
+
magpie library mcp add kimi /path/to/kimi-plugin-cc/scripts/companion.sh mcp agents=copilot,cursor,grok --local
|
|
318
|
+
```
|
|
387
319
|
|
|
388
|
-
|
|
320
|
+
如果 `claude`、`codex`、`antigravity` 或 `dsh` 已经直接加载了 Kimi 插件,请不要在 Magpie 中添加它们,以免服务器名称冲突。
|
|
389
321
|
|
|
390
|
-
|
|
322
|
+
随后在终端中运行一次 `/path/to/kimi-plugin-cc/scripts/companion.sh setup` 和 `setup --check`,或者直接让代理调用 `kimi_setup`。
|
|
391
323
|
|
|
392
|
-
|
|
324
|
+
## 从 npm 安装
|
|
393
325
|
|
|
394
|
-
|
|
326
|
+
你也可以从 npm 安装 [`kimi-plugin-cc` 包](https://www.npmjs.com/package/kimi-plugin-cc) 到单独的包目录中。请将该目录与存放共享运行时数据的 `~/.local/share/kimi-plugin-cc` 分开:
|
|
395
327
|
|
|
396
|
-
```
|
|
397
|
-
/kimi
|
|
328
|
+
```sh
|
|
329
|
+
npm install --prefix ~/.local/share/kimi-plugin-cc-pkg kimi-plugin-cc@3.1.0
|
|
330
|
+
claude --plugin-dir ~/.local/share/kimi-plugin-cc-pkg/node_modules/kimi-plugin-cc
|
|
398
331
|
```
|
|
399
332
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
要测试某个模型,请用它的别名运行一个小任务。这会通过你的账户调用服务商。
|
|
333
|
+
请勿在同一个宿主中同时加载 npm 副本和已启用的插件市场副本。维护者请参阅 [npm 发布指南](./docs/ci.md#npm-oidc-publishing)。
|
|
403
334
|
|
|
404
|
-
|
|
335
|
+
## 通过 MCP 使用 Kimi
|
|
405
336
|
|
|
406
|
-
|
|
337
|
+
所有宿主共享相同的 4 个 MCP 工具,并支持完整的 `SEP-2640` 技能发现(通过 `skills/list`、`skills/get`、`resources/list` 和 `resources/read` 读取 `skill://kimi/SKILL.md` 与 `skill://kimi/agents/openai.yaml`):
|
|
407
338
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
你可以用以下命令跟进任务:
|
|
411
|
-
|
|
412
|
-
| 操作 | Claude Code 命令 | Codex 技能 |
|
|
339
|
+
| 工具 | 模式或操作 | 是否写入文件 |
|
|
413
340
|
| --- | --- | --- |
|
|
414
|
-
|
|
|
415
|
-
|
|
|
416
|
-
|
|
|
341
|
+
| `kimi_read` | `mode`: `ask`(默认)、`review`、`challenge`、`swarm` | 否 |
|
|
342
|
+
| `kimi_write` | `mode`: `rescue`(默认)、`pursue`、`swarm_patch` | 仅限工作区文件(`swarm_patch` 返回未应用的工作树补丁),绝不改动 Git |
|
|
343
|
+
| `kimi_job` | `action`: `list`、`status`、`result`、`wait`、`cancel`、`replay`、`recover_swarm` | 否(用于停止任务或保存恢复补丁) |
|
|
344
|
+
| `kimi_setup` | `action`: `check`(默认)、`models`、`install`、`install_kimi`、`repair_sessions` | 更新 `~/.kimi-code/config.toml` 钩子块、插件专用 CLI 或会话预览 |
|
|
417
345
|
|
|
418
|
-
|
|
346
|
+
对 `kimi_read` 和 `kimi_write` 的标准 `tools/call` 请求默认最多等待 50 秒(`wait: true`),并直接返回结果文本。你可以将 `wait_timeout_ms` 调高至 `86400000` 毫秒(24 小时)。如果客户端断开连接或取消等待,插件会停止轮询,而后台 Kimi 任务会继续运行。
|
|
419
347
|
|
|
420
|
-
|
|
348
|
+
在并行启动多个任务时,传入 `wait: false` 可以立即获得 `{ job_id }`。随后你可以用 `kimi_job` 查看、等待或停止每个任务。支持 MCP `2026-07-28` 任务协议(`io.modelcontextprotocol/tasks`)的客户端会直接收到可用于 `tasks/get` 和 `tasks/cancel` 的原生任务句柄。
|
|
421
349
|
|
|
422
|
-
|
|
350
|
+
当宿主没有设置默认项目目录时,请传入绝对路径 `workspace`。收到任何 `Warnings:` 警告块时,请原样转达给用户。
|
|
423
351
|
|
|
424
|
-
|
|
352
|
+
## 在终端中使用 Kimi
|
|
425
353
|
|
|
426
|
-
|
|
354
|
+
你可以通过 `scripts/companion.sh` 直接运行 5 个主 CLI 子命令:
|
|
427
355
|
|
|
428
|
-
|
|
356
|
+
| 命令 | 用途 |
|
|
357
|
+
| --- | --- |
|
|
358
|
+
| `scripts/companion.sh read [--mode ask\|review\|challenge\|swarm] [options] [--] [prompt]` | 运行只读提问、差异审查(`--base <ref>`)、设计质疑或并行只读任务 |
|
|
359
|
+
| `scripts/companion.sh write [--mode rescue\|pursue\|swarm-patch] [options] [--] <prompt>` | 运行工作区修复、多步目标或临时工作树补丁任务 |
|
|
360
|
+
| `scripts/companion.sh job <list\|status\|result\|wait\|cancel\|replay\|recover-swarm> [job-id]` | 列出、查看、读取、等待、停止、重放或恢复任务 |
|
|
361
|
+
| `scripts/companion.sh setup [--check\|--uninstall\|--models\|--install-kimi\|--repair-sessions]` | 安装或检查安全钩子、列出模型、安装认证版 Kimi `2.8.0` 或修复会话预览 |
|
|
362
|
+
| `scripts/companion.sh mcp` | 启动 stdio MCP 服务器 |
|
|
429
363
|
|
|
430
|
-
|
|
431
|
-
- **Codex:** 目前使用普通 MCP 结果,而不是原生 MCP 任务。附加完成后,仍在运行的任务返回启动句柄;已结束的任务直接返回最终结果。使用上述三个任务控制工具查看进度、读取结果或取消任务。
|
|
364
|
+
请将 `--mode` 和其他选项放在 `--` 或提示词之前。旧版子命令写法(如 `ask`、`review`、`task rescue`、`status`、`result` 和 `cancel`)仍作为兼容别名保留。
|
|
432
365
|
|
|
433
|
-
|
|
366
|
+
## 在任务中引用早期会话
|
|
434
367
|
|
|
435
|
-
|
|
368
|
+
在 MCP 中使用 `referenced_sessions` 或在 CLI 中使用 `--reference-session <id>`,可以传入 1 到 8 个早期任务 ID 或 Kimi 会话 ID。此功能适用于 `ask`、`review`、`challenge`、`rescue`、`swarm` 和 `swarm_patch`,但不适用于 `pursue`:
|
|
436
369
|
|
|
437
|
-
|
|
370
|
+
```sh
|
|
371
|
+
scripts/companion.sh read --reference-session <job-id> -- Continue the migration from where that session stopped.
|
|
372
|
+
```
|
|
438
373
|
|
|
439
|
-
|
|
374
|
+
Kimi 会收到每个会话主日志的路径,并按需读取内容。当你设置了 `read_roots` 或 `network` 时,插件会将每个被引用会话的 `agents/main` 目录加入允许读取的根目录列表。请仅在这些会话日志内容允许离开本机时,才将其与 `network` 一起使用。
|
|
440
375
|
|
|
441
|
-
|
|
376
|
+
## 限制任务的读取范围和网络访问
|
|
442
377
|
|
|
443
|
-
|
|
378
|
+
默认情况下,只读任务可以读取当前系统用户有权读取的任何文件,且不能访问互联网。你可以通过以下 2 个选项限制 `kimi_read`(`ask`、`review`、`challenge` 和 `swarm`)与 `companion.sh read`:
|
|
444
379
|
|
|
445
|
-
|
|
380
|
+
- `read_roots` 或 `--read-root <abs-dir>`(可重复)将 `Read`、`Grep`、`Glob` 和 `ReadMediaFile` 限制在工作区和列出的目录内
|
|
381
|
+
- `network: true` 或 `--network` 允许 `WebSearch` 和 `FetchURL` 访问公共主机,并将上述 4 个读取工具限制在工作区和列出的读取目录内
|
|
446
382
|
|
|
447
|
-
|
|
448
|
-
codex plugin marketplace upgrade kimi-marketplace
|
|
449
|
-
codex plugin add kimi@kimi-marketplace
|
|
450
|
-
```
|
|
383
|
+
写入任务不接受这两个选项。读取范围和网络限制仅对单次运行生效,不会继承到后续恢复的会话轮次。
|
|
451
384
|
|
|
452
|
-
|
|
385
|
+
## 在 Kimi 更新时保持兼容
|
|
453
386
|
|
|
454
|
-
|
|
387
|
+
插件 3.1.0 采用从 Kimi Code `2.8.0` 起算的滚动兼容窗口:
|
|
455
388
|
|
|
456
|
-
|
|
389
|
+
- 精确版本 `2.8.0` 支持运行全部 7 项操作
|
|
390
|
+
- 高于 `2.8.0` 的未列入正式版 `2.y.z` 可以带警告并使用 `--environment local` 运行只读的 `ask`、`review` 和 `challenge`
|
|
391
|
+
- 高于 `2.8.0` 的未列入正式版 `2.y.z` 会以 `KIMI_CAPABILITY_NOT_CERTIFIED` 拒绝写入任务、并行 swarm 任务和 `--network`
|
|
392
|
+
- 低于 `2.8.0` 的版本会拒绝所有操作
|
|
457
393
|
|
|
458
|
-
|
|
394
|
+
若要在所有宿主之间共享同一个已认证的二进制文件并保持全部 7 项操作可用,请运行 `kimi_setup({ action: "install_kimi" })` 或 `scripts/companion.sh setup --install-kimi`。这是唯一会从网络下载文件的命令。任务会优先选择 `KIMI_PLUGIN_CC_KIMI_BIN`,其次是共享数据目录下的 `<data-dir>/kimi-bin/current`,最后是 `PATH` 中的 `kimi`。
|
|
459
395
|
|
|
460
|
-
|
|
396
|
+
## 共享单一数据目录和安全钩子
|
|
461
397
|
|
|
462
|
-
|
|
398
|
+
全部 5 个宿主共享同一个数据目录(`<data-dir>`)和位于 `<data-dir>/hook/approval-hook.js` 的单一打包 PreToolUse 安全钩子。默认数据目录在 macOS 和 Linux 上为 `~/.local/share/kimi-plugin-cc`(或 `$XDG_DATA_HOME/kimi-plugin-cc`),在 Windows 上为 `%LOCALAPPDATA%\kimi-plugin-cc`。你可以用 `KIMI_PLUGIN_CC_DATA` 覆盖父级基础目录,使数据存放在 `$KIMI_PLUGIN_CC_DATA/kimi-plugin-cc` 下。
|
|
463
399
|
|
|
464
|
-
|
|
400
|
+
运行一次 `setup` 即可发布打包好的安全钩子,并在 `~/.kimi-code/config.toml` 中写入单一的 `# === BEGIN kimi-plugin-cc-managed (v3.1.0) ===` 配置块,同时自动合并 3.0 版本遗留的 `:<host-id>` 配置块。共享同一个 Node 二进制文件的宿主只需运行一次 `setup`。如果不同宿主解析到不同的 Node 路径,请通过 `KIMI_PLUGIN_CC_NODE_BIN` 将它们指向同一个 Node 可执行文件。
|
|
465
401
|
|
|
466
|
-
|
|
402
|
+
## 管理会话、模型和任务
|
|
467
403
|
|
|
468
|
-
|
|
404
|
+
会话会显示在 Kimi Code Desktop 和 `kimi web` 中,并以你的原始请求作为预览文本。运行 `kimi_setup({ action: "repair_sessions" })` 或 `scripts/companion.sh setup --repair-sessions [--apply] [--all]` 可以修复缺失的预览。详见 [会话可见性与标题](./docs/session-visibility.md)。
|
|
469
405
|
|
|
470
|
-
|
|
406
|
+
使用 `kimi_setup({ action: "models" })` 或 `scripts/companion.sh setup --models [--json]` 可以在本地离线列出已配置的模型别名。在 MCP 中传入 `model` 或在 CLI 中传入 `-m` 可为单次运行指定模型,也可在 `kimi` 内部运行 `/model` 更改默认模型。详见 [模型选择指南](./docs/models.md)。
|
|
471
407
|
|
|
472
|
-
|
|
408
|
+
使用 `kimi_job`(`list`、`status`、`result`、`wait`、`cancel`、`replay` 和 `recover_swarm`)或 `scripts/companion.sh job` 跟踪或停止任务。请务必通过 `kimi_job` 或 `job cancel` 停止任务,而不要直接强行中断宿主,以便 `swarm_patch` 能够保存生成的补丁。关于中断任务的恢复,请参阅 [swarm 恢复指南](./docs/swarm-recovery.md)。
|
|
473
409
|
|
|
474
|
-
|
|
410
|
+
如需移除托管的安全钩子,请运行 `scripts/companion.sh setup --uninstall`。如果你正从 3.0 版本升级,请参阅 [从 3.0 升级到 3.1](./docs/migration.md#upgrading-from-30-to-31)。
|
|
475
411
|
|
|
476
|
-
|
|
412
|
+
## 了解安全边界
|
|
477
413
|
|
|
478
|
-
|
|
414
|
+
单一的 PreToolUse 安全钩子会检查每一次 Kimi 工具调用:
|
|
479
415
|
|
|
480
|
-
|
|
416
|
+
- 只读任务禁止修改文件和运行 shell 命令
|
|
417
|
+
- 写入任务只能在工作区内修改文件,且绝不改动 Git 状态
|
|
418
|
+
- `swarm_patch` 在基于 `HEAD` 的临时 Git 工作树内修改文件,并返回未应用的补丁
|
|
481
419
|
|
|
482
|
-
|
|
420
|
+
本插件不会执行以下操作:
|
|
483
421
|
|
|
484
|
-
|
|
422
|
+
- 除非设置了 `read_roots` 或 `network`,否则不限制文件读取范围
|
|
423
|
+
- 在 `FetchURL` 校验字面 URL 之后,不检查 DNS 解析结果或 HTTP 重定向目标
|
|
424
|
+
- 不对写入任务启动的仓库测试运行器进行操作系统级沙箱隔离
|
|
425
|
+
- 不自动应用补丁,也不创建 Git 提交
|
|
485
426
|
|
|
486
|
-
|
|
427
|
+
请仅在受信任的代码仓库中运行写入任务。关于拒绝码和版本历史,请参阅 [安全性与拒绝码](./docs/safety.md#native-v2-refusal-codes) 和 [更新日志](./CHANGELOG.md)。
|
|
487
428
|
|
|
488
|
-
|
|
429
|
+
## 报告问题与参与贡献
|
|
489
430
|
|
|
490
|
-
|
|
431
|
+
欢迎在 [GitHub issues](https://github.com/linxule/kimi-plugin-cc/issues) 中报告缺陷或提出改进建议。贡献者可以阅读 [运行时不变量](./docs/invariants.md) 和 [持续集成说明](./docs/ci.md)。
|
|
491
432
|
|
|
492
433
|
</details>
|
|
493
434
|
|
|
494
435
|
<details>
|
|
495
|
-
<summary>Français
|
|
436
|
+
<summary>Français : bien démarrer</summary>
|
|
496
437
|
|
|
497
|
-
## Utiliser Kimi
|
|
438
|
+
## Utiliser Kimi dans vos tâches de développement
|
|
498
439
|
|
|
499
|
-
|
|
440
|
+
Envoyez vos questions, revues de code, critiques de conception, correctifs ciblés, objectifs en plusieurs étapes et tâches parallèles à votre CLI locale Kimi Code. Vous pouvez appeler Kimi depuis Claude Code, Codex, Antigravity, DeepSeek Harness (DSH) ou Magpie.
|
|
500
441
|
|
|
501
|
-
Le plugin exécute Kimi
|
|
442
|
+
Le plugin exécute Kimi sur votre machine avec votre propre abonnement Kimi ou votre clé API. Il ne modifie jamais la connexion de votre application hôte. Votre fournisseur Kimi reçoit uniquement les invites et le code lus par chaque tâche.
|
|
502
443
|
|
|
503
|
-
|
|
444
|
+
Les tâches en lecture seule ne peuvent ni modifier de fichiers ni lancer de commandes shell. Les tâches en écriture modifient des fichiers uniquement dans votre espace de travail ou dans un arbre de travail Git temporaire, sans jamais modifier l'historique Git.
|
|
504
445
|
|
|
505
|
-
|
|
446
|
+
## Avant d'installer
|
|
506
447
|
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
Il vous faut :
|
|
448
|
+
Vous avez besoin des éléments suivants :
|
|
510
449
|
|
|
511
450
|
- macOS ou Linux
|
|
512
|
-
-
|
|
513
|
-
- Node.js 22.5 ou
|
|
514
|
-
- Kimi Code CLI 2.
|
|
451
|
+
- Claude Code, Codex, Antigravity, DSH `>=0.2.1-rc.5 <0.3.0` ou Magpie (ou tout client MCP stdio)
|
|
452
|
+
- Node.js 22.5 ou plus récent (24.9 ou plus récent pour DSH)
|
|
453
|
+
- Kimi Code CLI `2.8.0` ou plus récent (ce plugin certifie `2.8.0` pour les 7 opérations et refuse les versions plus anciennes)
|
|
515
454
|
|
|
516
|
-
|
|
455
|
+
Ce plugin ne prend pas en charge l'exécution des modèles sous Windows. Les contributeurs peuvent lancer les [vérifications de diagnostic sous Windows](./docs/ci.md#windows-spawn-controls).
|
|
517
456
|
|
|
518
|
-
|
|
519
|
-
node --version
|
|
520
|
-
kimi --version
|
|
521
|
-
```
|
|
522
|
-
|
|
523
|
-
Si le CLI n'est pas installé, suivez le [guide d'installation de Kimi Code](https://www.kimi.com/code/docs/en/kimi-code-cli/getting-started) (en anglais). Vous n'avez pas besoin de Bun ni d'étape de compilation pour utiliser ce plugin.
|
|
457
|
+
Installez Kimi Code avec le [guide de démarrage Kimi Code](https://www.kimi.com/code/docs/en/kimi-code-cli/getting-started), ou laissez `kimi_setup` installer un binaire `2.8.0` certifié pour vous. Vous n'avez besoin ni de Bun ni d'une étape de compilation.
|
|
524
458
|
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
Lancez `kimi` dans un terminal. Utilisez `/login` pour un abonnement Kimi ou `/provider` pour configurer un fournisseur d'API. Saisissez vos identifiants dans Kimi, jamais dans la conversation avec l'assistant. Quittez Kimi une fois la configuration terminée. Si vous définissez `KIMI_CODE_HOME`, utilisez le même emplacement pour Kimi et le plugin.
|
|
459
|
+
Lancez `kimi` dans votre terminal, puis utilisez `/login` pour un abonnement Kimi ou `/provider` pour une clé API. Saisissez vos identifiants uniquement dans Kimi, jamais dans la discussion avec un assistant. Si vous définissez `KIMI_CODE_HOME`, utilisez le même répertoire pour Kimi et pour ce plugin.
|
|
528
460
|
|
|
529
461
|
## Installer dans Claude Code
|
|
530
462
|
|
|
531
|
-
|
|
463
|
+
Exécutez ces commandes dans Claude Code depuis votre projet :
|
|
532
464
|
|
|
533
465
|
```text
|
|
534
466
|
/plugin marketplace add linxule/kimi-plugin-cc
|
|
535
467
|
/plugin install kimi@kimi-marketplace
|
|
536
|
-
/kimi:setup
|
|
537
|
-
/kimi:setup --check
|
|
538
468
|
```
|
|
539
469
|
|
|
540
|
-
|
|
470
|
+
Claude Code charge automatiquement le serveur MCP `kimi` depuis `.mcp.json` ainsi que la compétence `skills/kimi/SKILL.md`. Demandez à Claude d'installer et de vérifier le hook de sécurité :
|
|
541
471
|
|
|
542
|
-
|
|
472
|
+
```text
|
|
473
|
+
Run kimi_setup with action "install", then action "check".
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
Vérifiez que la ligne `Probe:` affiche `ok`. Essayez ensuite une question en lecture seule :
|
|
543
477
|
|
|
544
478
|
```text
|
|
545
|
-
|
|
479
|
+
Use Kimi to explain how this project's main entry point works.
|
|
546
480
|
```
|
|
547
481
|
|
|
548
482
|
## Installer dans Codex
|
|
549
483
|
|
|
550
|
-
Exécutez ces commandes dans
|
|
484
|
+
Exécutez ces commandes dans votre terminal :
|
|
551
485
|
|
|
552
486
|
```sh
|
|
553
487
|
codex plugin marketplace add linxule/kimi-plugin-cc
|
|
554
488
|
codex plugin add kimi@kimi-marketplace
|
|
555
489
|
```
|
|
556
490
|
|
|
557
|
-
Ouvrez une nouvelle tâche Codex dans votre projet
|
|
558
|
-
|
|
559
|
-
```text
|
|
560
|
-
Utilise $kimi-setup pour installer le hook de sécurité, puis vérifie que tout est prêt.
|
|
561
|
-
```
|
|
562
|
-
|
|
563
|
-
Le hook vérifie les appels d'outils de Kimi selon les règles du plugin. La ligne `Probe:` doit afficher `ok`. En cas d'échec, consultez les consignes de dépannage ci-dessous. Essayez ensuite :
|
|
491
|
+
Ouvrez une nouvelle tâche Codex dans votre projet et envoyez cette invite :
|
|
564
492
|
|
|
565
493
|
```text
|
|
566
|
-
|
|
494
|
+
Use $kimi to run kimi_setup (install, then check), then explain how this project's main entry point works.
|
|
567
495
|
```
|
|
568
496
|
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
## Installer dans DeepSeek Harness (DSH)
|
|
572
|
-
|
|
573
|
-
DSH propose les sept mêmes opérations que les autres hôtes : `kimi_ask`, `kimi_review`, `kimi_challenge`, `kimi_rescue`, `kimi_pursue`, `kimi_swarm` et `kimi_swarm_write`. Elles utilisent le même runtime companion, les mêmes hooks de sécurité, jobs, budgets et artefacts. Rescue et pursue modifient l'espace de travail sélectionné ; swarm-write renvoie un patch sans l'appliquer ni le committer.
|
|
497
|
+
## Installer dans Antigravity
|
|
574
498
|
|
|
575
|
-
|
|
499
|
+
Créez un lien symbolique ou copiez la racine du dépôt dans le répertoire des plugins d'Antigravity. La racine contient `plugin.json`, `mcp_config.json`, `assets/logo.svg` et `skills/kimi/SKILL.md` :
|
|
576
500
|
|
|
577
501
|
```sh
|
|
578
|
-
|
|
502
|
+
ln -sfn /path/to/kimi-plugin-cc ~/.gemini/config/plugins/kimi
|
|
579
503
|
```
|
|
580
504
|
|
|
581
|
-
|
|
505
|
+
Redémarrez Antigravity ou rechargez ses plugins. Demandez ensuite à Antigravity d'exécuter `kimi_setup` avec `action: "install"` puis `action: "check"`.
|
|
582
506
|
|
|
583
|
-
|
|
507
|
+
## Installer dans DeepSeek Harness
|
|
584
508
|
|
|
585
|
-
|
|
509
|
+
Mettez d'abord à jour les dépendances de votre hôte et de votre profil DSH vers `zod >=4.6.6` et `undici >=8.12.2`. Suivez le [guide des correctifs pour l'hôte et les profils DSH](./docs/safety.md#patched-dsh-host-and-profiles) avant d'installer le plugin.
|
|
586
510
|
|
|
587
|
-
|
|
511
|
+
Installez le paquet racine depuis npm ou depuis un clone local. DSH charge directement `cordis.patch.yml` à la racine grâce à `@deepseek-ai/dsh-mcp-client` et `@deepseek-ai/dsh-skill-filesystem` :
|
|
588
512
|
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
513
|
+
```sh
|
|
514
|
+
dsh plugin --profile web add kimi-plugin-cc
|
|
515
|
+
```
|
|
592
516
|
|
|
593
|
-
|
|
594
|
-
| --- | --- | --- | --- |
|
|
595
|
-
| Expliquer du code | `/kimi:ask` | `$kimi-ask` | Lecture seule |
|
|
596
|
-
| Faire une revue des modifications | `/kimi:review` | `$kimi-review` | Lecture seule |
|
|
597
|
-
| Remettre en question une conception ou une approche | `/kimi:challenge` | `$kimi-challenge` | Lecture seule |
|
|
598
|
-
| Corriger un problème précis | `/kimi:rescue` | `$kimi-rescue` | Peut modifier votre projet |
|
|
599
|
-
| Examiner plusieurs parties à la fois | `/kimi:swarm` | `$kimi-swarm` | Lecture seule |
|
|
600
|
-
| Préparer des modifications en parallèle | `/kimi:swarm --write` | `$kimi-swarm-write` | Uniquement dans un worktree Git temporaire ; renvoie un patch que vous pouvez appliquer |
|
|
601
|
-
| Poursuivre un objectif sur plusieurs tours | `/kimi:pursue` | `$kimi-pursue` | Peut modifier votre projet ; fonction expérimentale |
|
|
517
|
+
Pour installer le plugin depuis un clone local, exécutez `dsh plugin --profile web add .`. Pour DSH Discover, activez les index de plugins personnalisés et ajoutez `https://raw.githubusercontent.com/linxule/kimi-plugin-cc/main/dsh/index.json`. Redémarrez DSH, puis exécutez `kimi_setup` avec `install` et `check`.
|
|
602
518
|
|
|
603
|
-
|
|
519
|
+
## Installer dans Magpie et d'autres clients MCP
|
|
604
520
|
|
|
605
|
-
|
|
521
|
+
Enregistrez `scripts/companion.sh mcp` comme serveur MCP stdio local pour des agents tels que Copilot, Cursor et Grok :
|
|
606
522
|
|
|
607
|
-
|
|
523
|
+
```sh
|
|
524
|
+
magpie library mcp add kimi /path/to/kimi-plugin-cc/scripts/companion.sh mcp agents=copilot,cursor,grok --local
|
|
525
|
+
```
|
|
608
526
|
|
|
609
|
-
|
|
527
|
+
N'ajoutez pas `claude`, `codex`, `antigravity` ou `dsh` dans Magpie lorsque ces hôtes chargent déjà le plugin Kimi directement, afin d'éviter tout conflit de nom de serveur.
|
|
610
528
|
|
|
611
|
-
|
|
529
|
+
Exécutez ensuite `/path/to/kimi-plugin-cc/scripts/companion.sh setup` et `setup --check` une fois dans votre terminal, ou appelez `kimi_setup` depuis l'agent.
|
|
612
530
|
|
|
613
|
-
|
|
531
|
+
## Installer depuis npm
|
|
614
532
|
|
|
615
|
-
|
|
533
|
+
Vous pouvez aussi installer [`kimi-plugin-cc` depuis npm](https://www.npmjs.com/package/kimi-plugin-cc) dans un répertoire de paquet dédié. Gardez ce répertoire séparé de `~/.local/share/kimi-plugin-cc`, qui stocke les données d'exécution partagées :
|
|
616
534
|
|
|
617
|
-
```
|
|
618
|
-
/kimi
|
|
535
|
+
```sh
|
|
536
|
+
npm install --prefix ~/.local/share/kimi-plugin-cc-pkg kimi-plugin-cc@3.1.0
|
|
537
|
+
claude --plugin-dir ~/.local/share/kimi-plugin-cc-pkg/node_modules/kimi-plugin-cc
|
|
619
538
|
```
|
|
620
539
|
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
Pour tester un modèle de la liste, lancez une petite tâche avec son alias. Cela effectue un appel au fournisseur avec votre compte.
|
|
540
|
+
Ne chargez pas une copie npm en même temps qu'une copie issue du marketplace dans le même hôte. Les mainteneurs peuvent consulter le [guide de publication npm](./docs/ci.md#npm-oidc-publishing).
|
|
624
541
|
|
|
625
|
-
|
|
542
|
+
## Utiliser Kimi avec MCP
|
|
626
543
|
|
|
627
|
-
|
|
544
|
+
Chaque hôte partage les mêmes 4 outils MCP et la découverte complète des compétences `SEP-2640` (`skills/list`, `skills/get`, `resources/list` et `resources/read` pour `skill://kimi/SKILL.md` et `skill://kimi/agents/openai.yaml`) :
|
|
628
545
|
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
Utilisez ces commandes pour suivre une tâche :
|
|
632
|
-
|
|
633
|
-
| Action | Commande Claude Code | Skill Codex |
|
|
546
|
+
| Outil | Modes ou actions | Écriture de fichiers |
|
|
634
547
|
| --- | --- | --- |
|
|
635
|
-
|
|
|
636
|
-
|
|
|
637
|
-
|
|
|
548
|
+
| `kimi_read` | `mode`: `ask` (par défaut), `review`, `challenge`, `swarm` | Non |
|
|
549
|
+
| `kimi_write` | `mode`: `rescue` (par défaut), `pursue`, `swarm_patch` | Fichiers de l'espace de travail uniquement (`swarm_patch` renvoie un patch non appliqué), jamais Git |
|
|
550
|
+
| `kimi_job` | `action`: `list`, `status`, `result`, `wait`, `cancel`, `replay`, `recover_swarm` | Non (arrête les tâches ou enregistre les patchs de récupération) |
|
|
551
|
+
| `kimi_setup` | `action`: `check` (par défaut), `models`, `install`, `install_kimi`, `repair_sessions` | Met à jour le bloc hook de `~/.kimi-code/config.toml`, la CLI dédiée ou les aperçus de session |
|
|
638
552
|
|
|
639
|
-
|
|
553
|
+
Les appels standards `tools/call` sur `kimi_read` et `kimi_write` attendent jusqu'à 50 secondes par défaut (`wait: true`) et renvoient directement la réponse. Vous pouvez augmenter `wait_timeout_ms` jusqu'à `86400000` millisecondes (24 heures). Si le client se déconnecte ou annule l'attente, l'attente s'arrête mais la tâche Kimi continue en arrière-plan.
|
|
640
554
|
|
|
641
|
-
|
|
555
|
+
Passez `wait: false` pour obtenir `{ job_id }` immédiatement lorsque vous lancez des tâches en parallèle. Vous pouvez ensuite vérifier, attendre ou arrêter chaque tâche avec `kimi_job`. Les clients prenant en charge les tâches MCP `2026-07-28` (`io.modelcontextprotocol/tasks`) reçoivent des identifiants natifs pour `tasks/get` et `tasks/cancel`.
|
|
642
556
|
|
|
643
|
-
|
|
557
|
+
Passez un chemin absolu `workspace` lorsque votre hôte ne définit pas de répertoire de projet par défaut. Transmettez toujours tout bloc `Warnings:` à l'utilisateur.
|
|
644
558
|
|
|
645
|
-
|
|
559
|
+
## Utiliser Kimi depuis le terminal
|
|
646
560
|
|
|
647
|
-
|
|
561
|
+
Exécutez les 5 sous-commandes CLI principales via `scripts/companion.sh` :
|
|
648
562
|
|
|
649
|
-
|
|
563
|
+
| Commande | Action |
|
|
564
|
+
| --- | --- |
|
|
565
|
+
| `scripts/companion.sh read [--mode ask\|review\|challenge\|swarm] [options] [--] [prompt]` | Lancer une question en lecture seule, une revue de diff (`--base <ref>`), une critique de conception ou un swarm parallèle en lecture seule |
|
|
566
|
+
| `scripts/companion.sh write [--mode rescue\|pursue\|swarm-patch] [options] [--] <prompt>` | Lancer un correctif dans l'espace de travail, un objectif en plusieurs étapes ou un swarm de patch dans un arbre de travail temporaire |
|
|
567
|
+
| `scripts/companion.sh job <list\|status\|result\|wait\|cancel\|replay\|recover-swarm> [job-id]` | Lister, vérifier, lire, attendre, arrêter, rejouer ou récupérer des tâches |
|
|
568
|
+
| `scripts/companion.sh setup [--check\|--uninstall\|--models\|--install-kimi\|--repair-sessions]` | Installer ou vérifier le hook, lister les modèles, installer Kimi `2.8.0` certifié ou réparer les aperçus de session |
|
|
569
|
+
| `scripts/companion.sh mcp` | Démarrer le serveur MCP stdio |
|
|
650
570
|
|
|
651
|
-
|
|
652
|
-
- **Codex :** les appels utilisent actuellement des résultats MCP ordinaires, et non des tâches MCP natives. Après l'attachement, un job encore actif renvoie un handle de lancement ; un job déjà terminé renvoie directement son résultat final. Utilisez les trois outils de contrôle pour suivre, lire ou annuler le job.
|
|
571
|
+
Placez `--mode` et les autres options avant `--` ou le texte de l'invite. Les anciennes sous-commandes comme `ask`, `review`, `task rescue`, `status`, `result` et `cancel` fonctionnent toujours comme alias.
|
|
653
572
|
|
|
654
|
-
|
|
573
|
+
## Pointer une tâche vers une session précédente
|
|
655
574
|
|
|
656
|
-
|
|
575
|
+
Passez 1 à 8 identifiants de tâches ou de sessions Kimi précédentes avec `referenced_sessions` en MCP ou `--reference-session <id>` en CLI. Vous pouvez utiliser des références de session avec `ask`, `review`, `challenge`, `rescue`, `swarm` et `swarm_patch`, mais pas avec `pursue` :
|
|
657
576
|
|
|
658
|
-
|
|
577
|
+
```sh
|
|
578
|
+
scripts/companion.sh read --reference-session <job-id> -- Continue the migration from where that session stopped.
|
|
579
|
+
```
|
|
659
580
|
|
|
660
|
-
|
|
581
|
+
Kimi reçoit le chemin du journal principal de chaque session et lit uniquement ce dont il a besoin. Lorsque vous activez `read_roots` ou `network`, le plugin ajoute le répertoire `agents/main` de chaque session référencée aux répertoires de lecture autorisés. Combinez des références de session avec `network` uniquement si le contenu de ces journaux peut quitter votre machine.
|
|
661
582
|
|
|
662
|
-
|
|
583
|
+
## Limiter les fichiers lus et l'accès réseau
|
|
663
584
|
|
|
664
|
-
|
|
585
|
+
Par défaut, les tâches en lecture seule peuvent lire tout fichier accessible à votre compte utilisateur et n'ont pas accès au web. Vous pouvez restreindre `kimi_read` (`ask`, `review`, `challenge` et `swarm`) ainsi que `companion.sh read` avec 2 options :
|
|
665
586
|
|
|
666
|
-
|
|
587
|
+
- `read_roots` ou `--read-root <abs-dir>` (répétable) limite `Read`, `Grep`, `Glob` et `ReadMediaFile` à l'espace de travail et aux répertoires indiqués
|
|
588
|
+
- `network: true` ou `--network` autorise `WebSearch` et `FetchURL` vers les hôtes publics et limite les 4 outils de lecture à l'espace de travail et aux répertoires indiqués
|
|
667
589
|
|
|
668
|
-
|
|
669
|
-
codex plugin marketplace upgrade kimi-marketplace
|
|
670
|
-
codex plugin add kimi@kimi-marketplace
|
|
671
|
-
```
|
|
590
|
+
Les tâches en écriture refusent ces 2 options. Ces limites de lecture et de réseau s'appliquent à une seule exécution et ne sont jamais héritées lors d'une reprise.
|
|
672
591
|
|
|
673
|
-
|
|
592
|
+
## Garder Kimi fonctionnel lors des mises à jour
|
|
674
593
|
|
|
675
|
-
|
|
594
|
+
Le plugin 3.1.0 applique une fenêtre de compatibilité glissante à partir de Kimi Code `2.8.0` :
|
|
676
595
|
|
|
677
|
-
|
|
596
|
+
- la version exacte `2.8.0` exécute les 7 opérations
|
|
597
|
+
- les versions `2.y.z` standard supérieures à `2.8.0` exécutent `ask`, `review` et `challenge` en lecture seule avec un avertissement et `--environment local`
|
|
598
|
+
- les versions `2.y.z` standard supérieures à `2.8.0` refusent les tâches en écriture, les tâches swarm et `--network` avec le code `KIMI_CAPABILITY_NOT_CERTIFIED`
|
|
599
|
+
- les versions inférieures à `2.8.0` refusent toutes les opérations
|
|
678
600
|
|
|
679
|
-
|
|
601
|
+
Pour conserver les 7 opérations sur un binaire certifié partagé par tous les hôtes, exécutez `kimi_setup({ action: "install_kimi" })` ou `scripts/companion.sh setup --install-kimi`. C'est la seule commande qui télécharge des fichiers depuis le réseau. Les tâches choisissent d'abord `KIMI_PLUGIN_CC_KIMI_BIN`, puis `<data-dir>/kimi-bin/current` dans le répertoire de données partagé, et enfin `kimi` dans le `PATH`.
|
|
680
602
|
|
|
681
|
-
|
|
603
|
+
## Partager un répertoire de données et un hook de sécurité
|
|
682
604
|
|
|
683
|
-
|
|
605
|
+
Les 5 hôtes partagent un seul répertoire de données (`<data-dir>`) et un seul hook de sécurité PreToolUse empaqueté dans `<data-dir>/hook/approval-hook.js`. Le répertoire de données par défaut est `~/.local/share/kimi-plugin-cc` (ou `$XDG_DATA_HOME/kimi-plugin-cc`) sous macOS et Linux, et `%LOCALAPPDATA%\kimi-plugin-cc` sous Windows. Vous pouvez remplacer le répertoire parent avec `KIMI_PLUGIN_CC_DATA` pour stocker les données dans `$KIMI_PLUGIN_CC_DATA/kimi-plugin-cc`.
|
|
684
606
|
|
|
685
|
-
|
|
607
|
+
Exécuter `setup` une seule fois publie le hook empaqueté et écrit un bloc unique `# === BEGIN kimi-plugin-cc-managed (v3.1.0) ===` dans `~/.kimi-code/config.toml`. Cette commande remplace aussi automatiquement les anciens blocs `:<host-id>` de la version 3.0. Les hôtes qui partagent le même binaire Node n'ont besoin que d'une seule exécution de `setup`. Si vos hôtes utilisent des chemins Node différents, pointez-les vers le même binaire avec `KIMI_PLUGIN_CC_NODE_BIN`.
|
|
686
608
|
|
|
687
|
-
|
|
609
|
+
## Gérer les sessions, les modèles et les tâches
|
|
688
610
|
|
|
689
|
-
|
|
611
|
+
Les sessions apparaissent dans Kimi Code Desktop et `kimi web` avec votre invite brute comme aperçu. Exécutez `kimi_setup({ action: "repair_sessions" })` ou `scripts/companion.sh setup --repair-sessions [--apply] [--all]` pour réparer les aperçus manquants. Consultez [visibilité et titres des sessions](./docs/session-visibility.md) pour plus de détails.
|
|
690
612
|
|
|
691
|
-
|
|
613
|
+
Listez hors ligne vos alias de modèles configurés avec `kimi_setup({ action: "models" })` ou `scripts/companion.sh setup --models [--json]`. Passez `model` en MCP ou `-m` en CLI pour choisir un modèle sur une exécution, ou lancez `/model` dans `kimi` pour changer votre modèle par défaut. Consultez [sélection du modèle](./docs/models.md) pour plus de détails.
|
|
692
614
|
|
|
693
|
-
|
|
615
|
+
Suivez ou arrêtez vos tâches avec `kimi_job` (`list`, `status`, `result`, `wait`, `cancel`, `replay` et `recover_swarm`) ou `scripts/companion.sh job`. Arrêtez toujours une tâche avec `kimi_job` ou `job cancel` plutôt qu'en interrompant l'hôte, afin que `swarm_patch` puisse enregistrer son patch. Consultez [récupération de swarm](./docs/swarm-recovery.md) pour les exécutions interrompues.
|
|
694
616
|
|
|
695
|
-
|
|
617
|
+
Exécutez `scripts/companion.sh setup --uninstall` pour retirer le hook de sécurité géré. Si vous effectuez une mise à niveau depuis la version 3.0, suivez le guide de [mise à niveau de 3.0 vers 3.1](./docs/migration.md#upgrading-from-30-to-31).
|
|
696
618
|
|
|
697
|
-
|
|
619
|
+
## Comprendre les limites de sécurité
|
|
698
620
|
|
|
699
|
-
|
|
621
|
+
Un seul hook de sécurité PreToolUse vérifie chaque appel d'outil de Kimi :
|
|
700
622
|
|
|
701
|
-
|
|
623
|
+
- les tâches en lecture seule refusent les modifications de fichiers et les commandes shell
|
|
624
|
+
- les tâches en écriture modifient uniquement les fichiers de votre espace de travail et ne modifient jamais l'état Git
|
|
625
|
+
- `swarm_patch` modifie les fichiers dans un arbre de travail Git temporaire basé sur `HEAD` et renvoie un patch non appliqué
|
|
702
626
|
|
|
703
|
-
|
|
627
|
+
Le plugin ne fait pas ce qui suit :
|
|
704
628
|
|
|
705
|
-
|
|
629
|
+
- il ne limite pas la lecture des fichiers sauf si vous définissez `read_roots` ou `network`
|
|
630
|
+
- il ne vérifie pas la résolution DNS ni les redirections HTTP après la validation de l'URL par `FetchURL`
|
|
631
|
+
- il n'isole pas dans un bac à sable système les lanceurs de tests du dépôt exécutés par les tâches en écriture
|
|
632
|
+
- il n'applique pas de patchs et ne crée pas de commits Git
|
|
706
633
|
|
|
707
|
-
|
|
634
|
+
Exécutez des tâches en écriture uniquement dans des dépôts auxquels vous faites confiance. Pour connaître les codes de refus et l'historique des versions, consultez [la sécurité et les codes de refus](./docs/safety.md#native-v2-refusal-codes) et le [journal des modifications](./CHANGELOG.md).
|
|
708
635
|
|
|
709
|
-
|
|
636
|
+
## Signaler un problème et contribuer
|
|
710
637
|
|
|
711
|
-
|
|
638
|
+
Signalez les bogues ou proposez des modifications dans les [issues GitHub](https://github.com/linxule/kimi-plugin-cc/issues). Les contributeurs peuvent lire les [invariants d'exécution](./docs/invariants.md) et les [détails d'intégration continue](./docs/ci.md).
|
|
712
639
|
|
|
713
640
|
</details>
|
|
714
641
|
|
|
715
642
|
<details>
|
|
716
|
-
<summary
|
|
643
|
+
<summary>日本語:はじめに</summary>
|
|
717
644
|
|
|
718
|
-
## Kimi
|
|
645
|
+
## コーディングタスクで Kimi を使う
|
|
719
646
|
|
|
720
|
-
|
|
647
|
+
質問、コードレビュー、設計への批評、ワークスペース内の修正、複数ステップのゴール、並列スウォームをローカルの Kimi Code CLI に送信できます。Claude Code、Codex、Antigravity、DeepSeek Harness(DSH)、または Magpie から Kimi を呼び出せます。
|
|
721
648
|
|
|
722
|
-
|
|
649
|
+
プラグインはご自身の Kimi サブスクリプションまたは API キーを使ってローカルで Kimi を実行し、ホスト側のログイン状態を変更しません。Kimi のプロバイダーには、各タスクが読み取ったプロンプトとコードだけが送信されます。
|
|
723
650
|
|
|
724
|
-
|
|
651
|
+
読み取り専用タスクは、ファイルの編集もシェルコマンドの実行もできません。書き込みタスクは、ワークスペース内または一時的な Git ワークツリー内のファイルだけを編集し、Git の履歴は一切変更しません。
|
|
725
652
|
|
|
726
653
|
## インストール前の準備
|
|
727
654
|
|
|
728
|
-
|
|
655
|
+
次の環境が必要です:
|
|
729
656
|
|
|
730
657
|
- macOS または Linux
|
|
731
|
-
-
|
|
732
|
-
- Node.js 22.5 以降(DSH
|
|
733
|
-
- Kimi Code CLI 2.
|
|
734
|
-
|
|
735
|
-
現在、Windows には対応していません。ターミナルでバージョンを確認します。
|
|
736
|
-
|
|
737
|
-
```sh
|
|
738
|
-
node --version
|
|
739
|
-
kimi --version
|
|
740
|
-
```
|
|
658
|
+
- Claude Code、Codex、Antigravity、DSH `>=0.2.1-rc.5 <0.3.0`、または Magpie(もしくは任意の stdio MCP クライアント)
|
|
659
|
+
- Node.js 22.5 以降(DSH は 24.9 以降)
|
|
660
|
+
- Kimi Code CLI `2.8.0` 以降(このプラグインは `2.8.0` で全 7 操作を認定しており、それより古いバージョンを拒否します)
|
|
741
661
|
|
|
742
|
-
|
|
662
|
+
Windows ではモデル実行をサポートしていません。コントリビューターは [Windows 診断チェック](./docs/ci.md#windows-spawn-controls) を実行できます。
|
|
743
663
|
|
|
744
|
-
|
|
664
|
+
[Kimi Code はじめにガイド](https://www.kimi.com/code/docs/en/kimi-code-cli/getting-started) に従って Kimi Code をインストールするか、`kimi_setup` を使って認定済みの `2.8.0` バイナリをインストールしてください。Bun やビルド手順は不要です。
|
|
745
665
|
|
|
746
|
-
ターミナルで `kimi`
|
|
666
|
+
ターミナルで `kimi` を実行し、サブスクリプションなら `/login`、API キーなら `/provider` で認証してください。認証情報は必ず Kimi 内で入力し、アシスタントのチャットには入力しないでください。`KIMI_CODE_HOME` を設定する場合は、Kimi とこのプラグインで同じディレクトリを使ってください。
|
|
747
667
|
|
|
748
|
-
## Claude Code
|
|
668
|
+
## Claude Code へのインストール
|
|
749
669
|
|
|
750
|
-
|
|
670
|
+
プロジェクト内の Claude Code で次のコマンドを実行します:
|
|
751
671
|
|
|
752
672
|
```text
|
|
753
673
|
/plugin marketplace add linxule/kimi-plugin-cc
|
|
754
674
|
/plugin install kimi@kimi-marketplace
|
|
755
|
-
/kimi:setup
|
|
756
|
-
/kimi:setup --check
|
|
757
675
|
```
|
|
758
676
|
|
|
759
|
-
|
|
677
|
+
Claude Code は `.mcp.json` から `kimi` MCP サーバーを、`skills/kimi/SKILL.md` からスキルを自動的に読み込みます。Claude に安全フックのインストールと確認を依頼してください:
|
|
678
|
+
|
|
679
|
+
```text
|
|
680
|
+
Run kimi_setup with action "install", then action "check".
|
|
681
|
+
```
|
|
760
682
|
|
|
761
|
-
|
|
683
|
+
`Probe:` の行に `ok` と表示されることを確認してから、読み取り専用の質問を試してください:
|
|
762
684
|
|
|
763
685
|
```text
|
|
764
|
-
|
|
686
|
+
Use Kimi to explain how this project's main entry point works.
|
|
765
687
|
```
|
|
766
688
|
|
|
767
|
-
## Codex
|
|
689
|
+
## Codex へのインストール
|
|
768
690
|
|
|
769
|
-
|
|
691
|
+
ターミナルで次のコマンドを実行します:
|
|
770
692
|
|
|
771
693
|
```sh
|
|
772
694
|
codex plugin marketplace add linxule/kimi-plugin-cc
|
|
773
695
|
codex plugin add kimi@kimi-marketplace
|
|
774
696
|
```
|
|
775
697
|
|
|
776
|
-
|
|
698
|
+
プロジェクトで新しい Codex タスクを開き、次のプロンプトを送信します:
|
|
777
699
|
|
|
778
700
|
```text
|
|
779
|
-
$kimi
|
|
701
|
+
Use $kimi to run kimi_setup (install, then check), then explain how this project's main entry point works.
|
|
780
702
|
```
|
|
781
703
|
|
|
782
|
-
|
|
704
|
+
## Antigravity へのインストール
|
|
783
705
|
|
|
784
|
-
|
|
785
|
-
$kimi-ask を使って、このプロジェクトのメインのエントリーポイントがどう動くか説明してください。
|
|
786
|
-
```
|
|
787
|
-
|
|
788
|
-
Claude Code と Codex の両方を使う場合は、それぞれで setup を実行します。共通の Kimi 設定内に、各アプリ専用のフックが作られます。
|
|
789
|
-
|
|
790
|
-
## DeepSeek Harness(DSH)にインストールする
|
|
791
|
-
|
|
792
|
-
DSH 本体とプロファイルの依存パッケージには修正版(`zod >=4.6.6`、`undici >=8.12.2`)が必要です。プラグインのインストール前に[本体のインストールと監査の手順](./docs/registry-releases.md#patched-dsh-host-and-profiles)を確認してください。
|
|
793
|
-
|
|
794
|
-
DSH でも、ほかのホストと同じ 7 種類の操作を提供します:`kimi_ask`、`kimi_review`、`kimi_challenge`、`kimi_rescue`、`kimi_pursue`、`kimi_swarm`、`kimi_swarm_write`。同じ companion ランタイム、安全フック、ジョブ、予算、成果物を使用します。Rescue と pursue は選択したワークスペースを変更し、swarm-write はパッチを返すだけで、適用やコミットは行いません。
|
|
795
|
-
|
|
796
|
-
このリポジトリのチェックアウトからインストールする場合:
|
|
706
|
+
リポジトリのルートディレクトリを Antigravity のプラグインディレクトリにシンボリックリンクまたはコピーします。ルートには `plugin.json`、`mcp_config.json`、`assets/logo.svg`、`skills/kimi/SKILL.md` が含まれています:
|
|
797
707
|
|
|
798
708
|
```sh
|
|
799
|
-
|
|
709
|
+
ln -sfn /path/to/kimi-plugin-cc ~/.gemini/config/plugins/kimi
|
|
800
710
|
```
|
|
801
711
|
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
案内に従って DSH を再起動したら、`/kimi-setup` と `/kimi-setup --check` を実行します。独立した内容のタスクを指定して、上記のいずれかのツールを使ってください。ジョブ制御は `/kimi-status`、`/kimi-result`、`/kimi-cancel` です。`/kimi-setup --models` で設定済みモデルを一覧でき、`/kimi-setup --uninstall` は DSH のフックだけを削除します。
|
|
712
|
+
Antigravity を再起動するかプラグインを再読み込みしてから、`kimi_setup` を `action: "install"` と `action: "check"` で実行するよう依頼してください。
|
|
805
713
|
|
|
806
|
-
|
|
714
|
+
## DeepSeek Harness へのインストール
|
|
807
715
|
|
|
808
|
-
|
|
716
|
+
プラグインをインストールする前に、DSH のホストとプロファイルの依存関係を `zod >=4.6.6` と `undici >=8.12.2` に更新してください。最初に [パッチ適用済み DSH ホストとプロファイルの手順](./docs/safety.md#patched-dsh-host-and-profiles) を実行してください。
|
|
809
717
|
|
|
810
|
-
|
|
718
|
+
npm またはローカルのチェックアウトからルートパッケージをインストールします。DSH は `@deepseek-ai/dsh-mcp-client` と `@deepseek-ai/dsh-skill-filesystem` を使ってルートの `cordis.patch.yml` を直接読み込みます:
|
|
811
719
|
|
|
812
|
-
|
|
720
|
+
```sh
|
|
721
|
+
dsh plugin --profile web add kimi-plugin-cc
|
|
722
|
+
```
|
|
813
723
|
|
|
814
|
-
|
|
815
|
-
| --- | --- | --- | --- |
|
|
816
|
-
| コードを説明する | `/kimi:ask` | `$kimi-ask` | 読み取り専用 |
|
|
817
|
-
| コードの変更をレビューする | `/kimi:review` | `$kimi-review` | 読み取り専用 |
|
|
818
|
-
| 設計や方針の問題点を検討する | `/kimi:challenge` | `$kimi-challenge` | 読み取り専用 |
|
|
819
|
-
| 範囲を絞って修正する | `/kimi:rescue` | `$kimi-rescue` | プロジェクトのファイルを変更可能 |
|
|
820
|
-
| 複数の箇所を同時にレビューする | `/kimi:swarm` | `$kimi-swarm` | 読み取り専用 |
|
|
821
|
-
| 複数の変更を並行して準備する | `/kimi:swarm --write` | `$kimi-swarm-write` | 一時的な Git ワークツリー内のみ変更し、適用用のパッチを返す |
|
|
822
|
-
| 複数ターンにわたって目標に取り組む | `/kimi:pursue` | `$kimi-pursue` | プロジェクトのファイルを変更可能(実験的機能) |
|
|
724
|
+
ローカルのチェックアウトからインストールする場合は、`dsh plugin --profile web add .` を実行してください。DSH Discover を使う場合は、カスタムプラグインインデックスを有効にして `https://raw.githubusercontent.com/linxule/kimi-plugin-cc/main/dsh/index.json` を追加します。DSH を再起動してから、`kimi_setup` で `install` と `check` を実行してください。
|
|
823
725
|
|
|
824
|
-
|
|
726
|
+
## Magpie とその他の MCP クライアントへのインストール
|
|
825
727
|
|
|
826
|
-
|
|
728
|
+
Copilot、Cursor、Grok などのエージェント向けに、`scripts/companion.sh mcp` をローカル stdio MCP サーバーとして登録します:
|
|
827
729
|
|
|
828
|
-
|
|
730
|
+
```sh
|
|
731
|
+
magpie library mcp add kimi /path/to/kimi-plugin-cc/scripts/companion.sh mcp agents=copilot,cursor,grok --local
|
|
732
|
+
```
|
|
829
733
|
|
|
830
|
-
|
|
734
|
+
`claude`、`codex`、`antigravity`、`dsh` がすでに Kimi プラグインを直接読み込んでいる場合は、サーバー名の競合を防ぐため Magpie 側には追加しないでください。
|
|
831
735
|
|
|
832
|
-
|
|
736
|
+
その後、ターミナルで `/path/to/kimi-plugin-cc/scripts/companion.sh setup` と `setup --check` を 1 回実行するか、エージェントから `kimi_setup` を呼び出してください。
|
|
833
737
|
|
|
834
|
-
|
|
738
|
+
## npm からのインストール
|
|
835
739
|
|
|
836
|
-
|
|
740
|
+
専用のパッケージディレクトリに [npm から `kimi-plugin-cc`](https://www.npmjs.com/package/kimi-plugin-cc) をインストールすることもできます。共有ランタイムデータを保存する `~/.local/share/kimi-plugin-cc` とは別のディレクトリを指定してください:
|
|
837
741
|
|
|
838
|
-
```
|
|
839
|
-
/kimi
|
|
742
|
+
```sh
|
|
743
|
+
npm install --prefix ~/.local/share/kimi-plugin-cc-pkg kimi-plugin-cc@3.1.0
|
|
744
|
+
claude --plugin-dir ~/.local/share/kimi-plugin-cc-pkg/node_modules/kimi-plugin-cc
|
|
840
745
|
```
|
|
841
746
|
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
一覧のモデルを試すには、そのエイリアスで小さなタスクを実行します。あなたのアカウントでプロバイダーへの呼び出しが発生します。
|
|
845
|
-
|
|
846
|
-
タスクごとにモデルを指定しても、保存済みのデフォルト設定は変わりません。デフォルトモデルを変更するには、`kimi` を実行して `/model` を使います。
|
|
747
|
+
同じホスト内で、有効なマーケットプレイス版と npm 版を同時に読み込まないでください。メンテナーは [npm 公開手順](./docs/ci.md#npm-oidc-publishing) を参照してください。
|
|
847
748
|
|
|
848
|
-
|
|
749
|
+
## MCP で Kimi を使う
|
|
849
750
|
|
|
850
|
-
|
|
751
|
+
すべてのホストが同じ 4 つの MCP ツールと完全な `SEP-2640` スキル検出(`skill://kimi/SKILL.md` と `skill://kimi/agents/openai.yaml` に対する `skills/list`、`skills/get`、`resources/list`、`resources/read`)を共有します:
|
|
851
752
|
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
| 操作 | Claude Code コマンド | Codex スキル |
|
|
753
|
+
| ツール | モードまたはアクション | ファイル書き込み |
|
|
855
754
|
| --- | --- | --- |
|
|
856
|
-
|
|
|
857
|
-
|
|
|
858
|
-
|
|
|
755
|
+
| `kimi_read` | `mode`: `ask`(既定)、`review`、`challenge`、`swarm` | 不可 |
|
|
756
|
+
| `kimi_write` | `mode`: `rescue`(既定)、`pursue`、`swarm_patch` | ワークスペース内のファイルのみ(`swarm_patch` は未適用のワークツリーパッチを返す)、Git の変更は不可 |
|
|
757
|
+
| `kimi_job` | `action`: `list`、`status`、`result`、`wait`、`cancel`、`replay`、`recover_swarm` | 不可(ジョブの停止や復旧パッチの保存を行う) |
|
|
758
|
+
| `kimi_setup` | `action`: `check`(既定)、`models`、`install`、`install_kimi`、`repair_sessions` | `~/.kimi-code/config.toml` のフックブロック、プラグイン専用 CLI、またはセッションプレビューを更新 |
|
|
859
759
|
|
|
860
|
-
|
|
760
|
+
`kimi_read` と `kimi_write` に対する標準の `tools/call` リクエストは、既定で最大 50 秒待機し(`wait: true`)、回答を直接返します。`wait_timeout_ms` は最大 `86400000` ミリ秒(24 時間)まで延長できます。クライアントが切断または待機をキャンセルするとポーリングは止まりますが、Kimi ジョブ自体は継続します。
|
|
861
761
|
|
|
862
|
-
|
|
762
|
+
並列タスクを起動するときにすぐ `{ job_id }` を受け取るには、`wait: false` を指定してください。その後、`kimi_job` で各ジョブの確認、待機、停止を行えます。MCP `2026-07-28` タスク(`io.modelcontextprotocol/tasks`)に対応したクライアントは、`tasks/get` と `tasks/cancel` 用のネイティブタスクハンドルを受け取ります。
|
|
863
763
|
|
|
864
|
-
|
|
764
|
+
ホストが既定のプロジェクトディレクトリを設定しない場合は、絶対パスで `workspace` を渡してください。`Warnings:` ブロックが返された場合は、必ずユーザーにそのまま伝えてください。
|
|
865
765
|
|
|
866
|
-
|
|
766
|
+
## ターミナルから Kimi を使う
|
|
867
767
|
|
|
868
|
-
|
|
768
|
+
`scripts/companion.sh` から 5 つの主要 CLI サブコマンドを直接実行できます:
|
|
869
769
|
|
|
870
|
-
|
|
770
|
+
| コマンド | 動作内容 |
|
|
771
|
+
| --- | --- |
|
|
772
|
+
| `scripts/companion.sh read [--mode ask\|review\|challenge\|swarm] [options] [--] [prompt]` | 読み取り専用の質問、差分レビュー(`--base <ref>`)、設計への批評、または並列の読み取り専用スウォームを実行 |
|
|
773
|
+
| `scripts/companion.sh write [--mode rescue\|pursue\|swarm-patch] [options] [--] <prompt>` | ワークスペース内の修正、複数ステップのゴール、または一時ワークツリーでのパッチスウォームを実行 |
|
|
774
|
+
| `scripts/companion.sh job <list\|status\|result\|wait\|cancel\|replay\|recover-swarm> [job-id]` | ジョブの一覧表示、状態確認、結果取得、待機、停止、再出力、復旧を実行 |
|
|
775
|
+
| `scripts/companion.sh setup [--check\|--uninstall\|--models\|--install-kimi\|--repair-sessions]` | フックの導入と確認、モデル一覧表示、認定済み Kimi `2.8.0` の導入、セッションプレビューの修復を実行 |
|
|
776
|
+
| `scripts/companion.sh mcp` | stdio MCP サーバーを起動 |
|
|
871
777
|
|
|
872
|
-
|
|
873
|
-
- **Codex:** 現在はネイティブの MCP タスクではなく、通常の MCP 結果を使います。アタッチ後、実行中のジョブには起動ハンドルを返し、すでに終了したジョブには最終結果を直接返します。進捗確認・結果取得・キャンセルには 3 つのジョブ制御ツールを使います。
|
|
778
|
+
`--mode` などのフラグは `--` またはプロンプトの前に置いてください。`ask`、`review`、`task rescue`、`status`、`result`、`cancel` といった旧サブコマンドも互換エイリアスとしてそのまま使えます。
|
|
874
779
|
|
|
875
|
-
|
|
780
|
+
## 前のセッションを参照する
|
|
876
781
|
|
|
877
|
-
|
|
782
|
+
MCP の `referenced_sessions` または CLI の `--reference-session <id>` を使うと、1 から 8 個の過去のジョブ ID または Kimi セッション ID を渡せます。セッション参照は `ask`、`review`、`challenge`、`rescue`、`swarm`、`swarm_patch` で利用でき、`pursue` では使えません:
|
|
878
783
|
|
|
879
|
-
|
|
784
|
+
```sh
|
|
785
|
+
scripts/companion.sh read --reference-session <job-id> -- Continue the migration from where that session stopped.
|
|
786
|
+
```
|
|
880
787
|
|
|
881
|
-
|
|
788
|
+
Kimi は各セッションのメインログへのパスを受け取り、必要な箇所だけを読み取ります。`read_roots` または `network` を指定した場合、参照した各セッションの `agents/main` ディレクトリが読み取り許可ルートに追加されます。そのセッションログの内容がマシン外へ送信されても問題ない場合にのみ、`network` と組み合わせてください。
|
|
882
789
|
|
|
883
|
-
|
|
790
|
+
## 読み取り範囲とネットワークアクセスを制限する
|
|
884
791
|
|
|
885
|
-
|
|
792
|
+
既定では、読み取り専用タスクはユーザーアカウントが読み取れる任意のファイルを読み取ることができ、ウェブにはアクセスできません。`kimi_read`(`ask`、`review`、`challenge`、`swarm`)および `companion.sh read` では、次の 2 つのオプションで範囲を制限できます:
|
|
886
793
|
|
|
887
|
-
|
|
794
|
+
- `read_roots` または `--read-root <abs-dir>`(複数指定可)は、`Read`、`Grep`、`Glob`、`ReadMediaFile` の読み取り対象をワークスペースと指定ディレクトリだけに制限する
|
|
795
|
+
- `network: true` または `--network` は、公開ホストへの `WebSearch` と `FetchURL` を許可し、4 つの読み取りツールをワークスペースと指定ディレクトリだけに制限する
|
|
888
796
|
|
|
889
|
-
|
|
890
|
-
codex plugin marketplace upgrade kimi-marketplace
|
|
891
|
-
codex plugin add kimi@kimi-marketplace
|
|
892
|
-
```
|
|
797
|
+
書き込みタスクではこれら 2 つのオプションを指定できません。読み取り範囲とネットワーク制限はその 1 回の実行にのみ適用され、再開したターンには引き継がれません。
|
|
893
798
|
|
|
894
|
-
|
|
799
|
+
## Kimi 更新時も動作を維持する
|
|
895
800
|
|
|
896
|
-
|
|
801
|
+
プラグイン 3.1.0 は Kimi Code `2.8.0` 以降のローリング互換ウィンドウを採用しています:
|
|
897
802
|
|
|
898
|
-
|
|
803
|
+
- 完全一致の `2.8.0` は全 7 操作を実行できる
|
|
804
|
+
- `2.8.0` より新しい未登録の通常版 `2.y.z` は、警告付きかつ `--environment local` で読み取り専用の `ask`、`review`、`challenge` を実行できる
|
|
805
|
+
- `2.8.0` より新しい未登録の通常版 `2.y.z` は、書き込みタスク、スウォームタスク、`--network` を `KIMI_CAPABILITY_NOT_CERTIFIED` で拒否する
|
|
806
|
+
- `2.8.0` 未満のリリースはすべての操作を拒否する
|
|
899
807
|
|
|
900
|
-
|
|
808
|
+
すべてのホストで共有される認定済みバイナリで全 7 操作を利用し続けるには、`kimi_setup({ action: "install_kimi" })` または `scripts/companion.sh setup --install-kimi` を実行してください。ネットワークからファイルをダウンロードするのはこのコマンドだけです。ジョブは `KIMI_PLUGIN_CC_KIMI_BIN`、共有データディレクトリ内の `<data-dir>/kimi-bin/current`、`PATH` 上の `kimi` の順に選択します。
|
|
901
809
|
|
|
902
|
-
|
|
810
|
+
## 単一のデータディレクトリと安全フックを共有する
|
|
903
811
|
|
|
904
|
-
|
|
812
|
+
全 5 ホストは、1 つのデータディレクトリ(`<data-dir>`)と `<data-dir>/hook/approval-hook.js` にある 1 つのバンドル済み PreToolUse 安全フックを共有します。既定のデータディレクトリは、macOS と Linux では `~/.local/share/kimi-plugin-cc`(または `$XDG_DATA_HOME/kimi-plugin-cc`)、Windows では `%LOCALAPPDATA%\kimi-plugin-cc` です。親ディレクトリを `KIMI_PLUGIN_CC_DATA` で上書きすると、データは `$KIMI_PLUGIN_CC_DATA/kimi-plugin-cc` に保存されます。
|
|
905
813
|
|
|
906
|
-
`
|
|
814
|
+
`setup` を 1 回実行すると、バンドル済みフックが配置され、`~/.kimi-code/config.toml` に単一の `# === BEGIN kimi-plugin-cc-managed (v3.1.0) ===` ブロックが書き込まれます。バージョン 3.0 の古い `:<host-id>` ブロックも自動的に統合されます。同じ Node バイナリを使うホスト間では、`setup` の実行は 1 回だけで十分です。ホストごとに異なる Node パスが解決される場合は、`KIMI_PLUGIN_CC_NODE_BIN` で同じ Node バイナリを指定してください。
|
|
907
815
|
|
|
908
|
-
|
|
816
|
+
## セッション、モデル、ジョブを管理する
|
|
909
817
|
|
|
910
|
-
|
|
818
|
+
セッションは Kimi Code Desktop と `kimi web` に表示され、元のリクエスト文がプレビューになります。プレビューを修復するには、`kimi_setup({ action: "repair_sessions" })` または `scripts/companion.sh setup --repair-sessions [--apply] [--all]` を実行してください。詳しくは [セッションの表示とタイトル](./docs/session-visibility.md) を参照してください。
|
|
911
819
|
|
|
912
|
-
|
|
820
|
+
設定済みのモデルエイリアスをオフラインで一覧表示するには、`kimi_setup({ action: "models" })` または `scripts/companion.sh setup --models [--json]` を実行します。1 回の実行だけモデルを指定するには MCP の `model` または CLI の `-m` を渡し、既定のモデルを変更するには `kimi` 内で `/model` を実行してください。詳しくは [モデル選択](./docs/models.md) を参照してください。
|
|
913
821
|
|
|
914
|
-
|
|
822
|
+
ジョブの追跡や停止には `kimi_job`(`list`、`status`、`result`、`wait`、`cancel`、`replay`、`recover_swarm`)または `scripts/companion.sh job` を使います。`swarm_patch` がパッチを保存できるよう、ホストを強制終了するのではなく、必ず `kimi_job` または `job cancel` で停止してください。中断された実行の復旧については [スウォームの復旧](./docs/swarm-recovery.md) を参照してください。
|
|
915
823
|
|
|
916
|
-
|
|
824
|
+
管理対象の安全フックを削除するには、`scripts/companion.sh setup --uninstall` を実行します。バージョン 3.0 からアップグレードする場合は、[3.0 から 3.1 へのアップグレード](./docs/migration.md#upgrading-from-30-to-31) を確認してください。
|
|
917
825
|
|
|
918
|
-
|
|
826
|
+
## 安全上の制限を理解する
|
|
919
827
|
|
|
920
|
-
|
|
828
|
+
単一の PreToolUse 安全フックが Kimi のすべてのツール呼び出しを検査します:
|
|
921
829
|
|
|
922
|
-
|
|
830
|
+
- 読み取り専用タスクはファイルの編集とシェルコマンドを拒否する
|
|
831
|
+
- 書き込みタスクはワークスペース内のファイルだけを編集し、Git の状態を変更しない
|
|
832
|
+
- `swarm_patch` は `HEAD` から作成した一時的な Git ワークツリー内で編集し、未適用のパッチを返す
|
|
923
833
|
|
|
924
|
-
|
|
834
|
+
このプラグインは次のことを行いません:
|
|
925
835
|
|
|
926
|
-
|
|
836
|
+
- `read_roots` または `network` を指定しない限り、ファイルの読み取り範囲を制限しない
|
|
837
|
+
- `FetchURL` が記述された URL を検証した後の DNS 解決や HTTP リダイレクトを検査しない
|
|
838
|
+
- 書き込みタスクが起動したリポジトリのテストランナーを OS レベルでサンドボックス化しない
|
|
839
|
+
- パッチの適用や Git コミットの作成を行わない
|
|
927
840
|
|
|
928
|
-
|
|
841
|
+
書き込みタスクは信頼できるリポジトリでのみ実行してください。拒否コードとリリース履歴については、[安全性と拒否コード](./docs/safety.md#native-v2-refusal-codes) と [変更履歴](./CHANGELOG.md) を参照してください。
|
|
929
842
|
|
|
930
|
-
|
|
843
|
+
## 問題の報告とコントリビュート
|
|
931
844
|
|
|
932
|
-
|
|
845
|
+
バグの報告や変更の提案は [GitHub issues](https://github.com/linxule/kimi-plugin-cc/issues) で受け付けています。コントリビューターは [ランタイム不変条件](./docs/invariants.md) と [継続的インテグレーションの詳細](./docs/ci.md) を参照してください。
|
|
933
846
|
|
|
934
847
|
</details>
|
|
935
848
|
|
|
936
849
|
---
|
|
937
850
|
|
|
938
|
-
This plugin uses [Kimi Code](https://github.com/MoonshotAI/kimi-code). Its runtime design draws on [OpenAI's codex-plugin-cc](https://github.com/openai/codex-plugin-cc).
|
|
851
|
+
This plugin uses [Kimi Code](https://github.com/MoonshotAI/kimi-code). Its runtime design draws on [OpenAI's codex-plugin-cc](https://github.com/openai/codex-plugin-cc). Licensed under [Apache-2.0](./LICENSE).
|