kimi-plugin-cc 3.0.0 → 3.1.1
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 -14
- package/README.md +428 -572
- package/assets/logo.svg +6 -0
- package/cordis.patch.yml +18 -0
- package/dist/background-spawn.js +4 -2
- package/dist/cli-client.js +105 -66
- package/dist/commands/ask.js +27 -12
- package/dist/commands/cancel.js +4 -13
- package/dist/commands/cli-helpers.js +1 -1
- package/dist/commands/pursue.js +3 -2
- package/dist/commands/registry.js +7 -26
- package/dist/commands/repair-sessions.js +7 -4
- package/dist/commands/replay.js +4 -3
- package/dist/commands/rescue.js +17 -5
- package/dist/commands/review.js +18 -5
- package/dist/commands/setup.js +283 -265
- package/dist/commands/swarm.js +20 -7
- package/dist/companion.js +142 -18
- package/dist/help.js +11 -7
- package/dist/hook-escape.js +7 -16
- package/dist/hooks/approval-hook.js +1762 -124
- package/dist/hooks/approval-policy.js +15 -10
- package/dist/hooks/config-safety.js +15 -24
- package/dist/hooks/hook-timing.js +1 -1
- package/dist/hooks/install-paths.js +224 -112
- package/dist/hooks/install.js +64 -169
- package/dist/hooks/managed-block.js +52 -101
- package/dist/job-store.js +117 -49
- package/dist/jobs.js +53 -1
- package/dist/kimi-engine.js +68 -92
- package/dist/kimi-errors.js +1 -1
- package/dist/kimi-journal.js +3 -2
- package/dist/kimi-releases.js +28 -49
- package/dist/kimi-timeouts.js +1 -15
- package/dist/kimi-version-probe.js +24 -72
- package/dist/logging.js +12 -7
- package/dist/mcp/binding.js +13 -4
- package/dist/mcp/job-control.js +386 -89
- package/dist/mcp/launcher.js +1 -1
- package/dist/mcp/operations.js +387 -193
- package/dist/mcp/protocol.js +116 -27
- package/dist/mcp/skills.js +130 -0
- package/dist/mcp/stdio.js +15 -2
- package/dist/native-v2-preflight.js +127 -35
- package/dist/parsing.js +45 -11
- package/dist/paths.js +20 -10
- package/dist/plugin-data.js +28 -83
- package/dist/read-scope.js +2 -2
- package/dist/render.js +13 -38
- package/dist/session-references.js +216 -0
- package/dist/session-title.js +1 -1
- package/dist/surface-routing.js +92 -5
- package/dist/swarm-activation.js +26 -137
- package/dist/version.js +1 -1
- package/docs/migration.md +46 -227
- package/docs/models.md +24 -66
- package/docs/safety.md +195 -400
- package/docs/session-visibility.md +24 -14
- 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 +2 -3
- package/plugins/kimi-codex/dist/background-spawn.js +4 -2
- package/plugins/kimi-codex/dist/cli-client.js +105 -66
- package/plugins/kimi-codex/dist/commands/ask.js +27 -12
- package/plugins/kimi-codex/dist/commands/cancel.js +4 -13
- package/plugins/kimi-codex/dist/commands/cli-helpers.js +1 -1
- package/plugins/kimi-codex/dist/commands/pursue.js +3 -2
- package/plugins/kimi-codex/dist/commands/registry.js +7 -26
- package/plugins/kimi-codex/dist/commands/repair-sessions.js +7 -4
- package/plugins/kimi-codex/dist/commands/replay.js +4 -3
- package/plugins/kimi-codex/dist/commands/rescue.js +17 -5
- package/plugins/kimi-codex/dist/commands/review.js +18 -5
- package/plugins/kimi-codex/dist/commands/setup.js +283 -265
- package/plugins/kimi-codex/dist/commands/swarm.js +20 -7
- package/plugins/kimi-codex/dist/companion.js +142 -18
- package/plugins/kimi-codex/dist/help.js +11 -7
- package/plugins/kimi-codex/dist/hook-escape.js +7 -16
- package/plugins/kimi-codex/dist/hooks/approval-hook.js +1762 -124
- package/plugins/kimi-codex/dist/hooks/approval-policy.js +15 -10
- package/plugins/kimi-codex/dist/hooks/config-safety.js +15 -24
- package/plugins/kimi-codex/dist/hooks/hook-timing.js +1 -1
- package/plugins/kimi-codex/dist/hooks/install-paths.js +224 -112
- package/plugins/kimi-codex/dist/hooks/install.js +64 -169
- package/plugins/kimi-codex/dist/hooks/managed-block.js +52 -101
- package/plugins/kimi-codex/dist/job-store.js +117 -49
- package/plugins/kimi-codex/dist/jobs.js +53 -1
- package/plugins/kimi-codex/dist/kimi-engine.js +68 -92
- package/plugins/kimi-codex/dist/kimi-errors.js +1 -1
- package/plugins/kimi-codex/dist/kimi-journal.js +3 -2
- package/plugins/kimi-codex/dist/kimi-releases.js +28 -49
- package/plugins/kimi-codex/dist/kimi-timeouts.js +1 -15
- package/plugins/kimi-codex/dist/kimi-version-probe.js +24 -72
- 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 +386 -89
- package/plugins/kimi-codex/dist/mcp/launcher.js +1 -1
- package/plugins/kimi-codex/dist/mcp/operations.js +387 -193
- package/plugins/kimi-codex/dist/mcp/protocol.js +116 -27
- package/plugins/kimi-codex/dist/mcp/skills.js +130 -0
- package/plugins/kimi-codex/dist/mcp/stdio.js +15 -2
- package/plugins/kimi-codex/dist/native-v2-preflight.js +127 -35
- package/plugins/kimi-codex/dist/parsing.js +45 -11
- package/plugins/kimi-codex/dist/paths.js +20 -10
- package/plugins/kimi-codex/dist/plugin-data.js +28 -83
- package/plugins/kimi-codex/dist/read-scope.js +2 -2
- package/plugins/kimi-codex/dist/render.js +13 -38
- package/plugins/kimi-codex/dist/session-references.js +216 -0
- package/plugins/kimi-codex/dist/session-title.js +1 -1
- package/plugins/kimi-codex/dist/surface-routing.js +92 -5
- package/plugins/kimi-codex/dist/swarm-activation.js +26 -137
- 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 -1402
- package/agents/kimi-pursue.md +0 -93
- package/agents/kimi-review.md +0 -86
- package/agents/kimi-swarm.md +0 -88
- package/agents/kimi-task.md +0 -93
- package/commands/README.md +0 -14
- package/commands/cancel.md +0 -17
- package/commands/pursue.md +0 -41
- package/commands/replay.md +0 -13
- package/commands/result.md +0 -13
- package/commands/review.md +0 -40
- package/commands/setup.md +0 -25
- package/commands/status.md +0 -13
- package/commands/swarm.md +0 -45
- package/commands/task.md +0 -40
- package/dist/commands/review-gate.js +0 -391
- package/dist/config.js +0 -22
- package/dist/dsh/companion.js +0 -177
- package/dist/dsh/index.js +0 -167
- package/dist/hooks/review-gate-stop.js +0 -19
- package/dist/schemas/review-gate-output.js +0 -41
- 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 -95
- 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/review-gate.js +0 -391
- 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 -167
- package/plugins/kimi-codex/dist/hooks/review-gate-stop.js +0 -19
- package/plugins/kimi-codex/dist/schemas/review-gate-output.js +0 -41
- package/plugins/kimi-codex/scripts/review-gate-hook.sh +0 -32
- 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-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-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 -35
- package/plugins/kimi-codex/skills/kimi-review/agents/openai.yaml +0 -6
- package/plugins/kimi-codex/skills/kimi-setup/SKILL.md +0 -35
- 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 -37
- package/plugins/kimi-codex/skills/kimi-swarm/agents/openai.yaml +0 -6
- package/plugins/kimi-codex/skills/kimi-task/SKILL.md +0 -37
- package/plugins/kimi-codex/skills/kimi-task/agents/openai.yaml +0 -6
- package/plugins/kimi-dsh/LICENSE +0 -201
- package/plugins/kimi-dsh/README.md +0 -84
- package/plugins/kimi-dsh/cordis.patch.yml +0 -45
- package/plugins/kimi-dsh/dist/background-spawn.js +0 -209
- package/plugins/kimi-dsh/dist/cli-cancellation.js +0 -43
- package/plugins/kimi-dsh/dist/cli-client.js +0 -1097
- package/plugins/kimi-dsh/dist/commands/ask.js +0 -269
- package/plugins/kimi-dsh/dist/commands/cancel.js +0 -177
- package/plugins/kimi-dsh/dist/commands/cli-helpers.js +0 -302
- package/plugins/kimi-dsh/dist/commands/models.js +0 -139
- package/plugins/kimi-dsh/dist/commands/pursue.js +0 -293
- 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 -266
- package/plugins/kimi-dsh/dist/commands/replay.js +0 -124
- package/plugins/kimi-dsh/dist/commands/rescue.js +0 -277
- package/plugins/kimi-dsh/dist/commands/result.js +0 -72
- package/plugins/kimi-dsh/dist/commands/review-gate.js +0 -391
- package/plugins/kimi-dsh/dist/commands/review.js +0 -217
- package/plugins/kimi-dsh/dist/commands/setup.js +0 -1465
- package/plugins/kimi-dsh/dist/commands/status.js +0 -27
- package/plugins/kimi-dsh/dist/commands/swarm.js +0 -823
- package/plugins/kimi-dsh/dist/commands/worker.js +0 -24
- package/plugins/kimi-dsh/dist/companion.js +0 -99
- 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 -167
- package/plugins/kimi-dsh/dist/errors.js +0 -40
- package/plugins/kimi-dsh/dist/git.js +0 -216
- 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 -145
- package/plugins/kimi-dsh/dist/hooks/approval-policy.js +0 -295
- package/plugins/kimi-dsh/dist/hooks/config-safety.js +0 -641
- package/plugins/kimi-dsh/dist/hooks/hook-timing.js +0 -48
- package/plugins/kimi-dsh/dist/hooks/install-paths.js +0 -428
- package/plugins/kimi-dsh/dist/hooks/install.js +0 -405
- package/plugins/kimi-dsh/dist/hooks/managed-block.js +0 -729
- 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 -631
- package/plugins/kimi-dsh/dist/jobs.js +0 -212
- package/plugins/kimi-dsh/dist/kimi-command.js +0 -144
- package/plugins/kimi-dsh/dist/kimi-engine.js +0 -770
- package/plugins/kimi-dsh/dist/kimi-errors.js +0 -205
- package/plugins/kimi-dsh/dist/kimi-home.js +0 -15
- package/plugins/kimi-dsh/dist/kimi-journal.js +0 -41
- package/plugins/kimi-dsh/dist/kimi-releases.js +0 -144
- package/plugins/kimi-dsh/dist/kimi-timeouts.js +0 -52
- package/plugins/kimi-dsh/dist/kimi-version-probe.js +0 -198
- 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 -343
- package/plugins/kimi-dsh/dist/mcp/launcher.js +0 -263
- package/plugins/kimi-dsh/dist/mcp/operations.js +0 -333
- package/plugins/kimi-dsh/dist/mcp/protocol.js +0 -277
- package/plugins/kimi-dsh/dist/mcp/server.js +0 -8
- package/plugins/kimi-dsh/dist/mcp/stdio.js +0 -79
- 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 -34
- package/plugins/kimi-dsh/dist/native-v2-preflight.js +0 -596
- package/plugins/kimi-dsh/dist/package.json +0 -1
- package/plugins/kimi-dsh/dist/parsing.js +0 -554
- package/plugins/kimi-dsh/dist/paths.js +0 -35
- package/plugins/kimi-dsh/dist/plugin-data.js +0 -98
- package/plugins/kimi-dsh/dist/process-tree.js +0 -597
- package/plugins/kimi-dsh/dist/prompt-size.js +0 -18
- package/plugins/kimi-dsh/dist/read-scope.js +0 -435
- package/plugins/kimi-dsh/dist/render.js +0 -214
- package/plugins/kimi-dsh/dist/rescue-approval.js +0 -1242
- package/plugins/kimi-dsh/dist/schemas/review-gate-output.js +0 -41
- package/plugins/kimi-dsh/dist/session-recovery.js +0 -202
- package/plugins/kimi-dsh/dist/session-title.js +0 -313
- package/plugins/kimi-dsh/dist/stream-json.js +0 -344
- package/plugins/kimi-dsh/dist/surface-routing.js +0 -21
- package/plugins/kimi-dsh/dist/swarm-activation.js +0 -1194
- package/plugins/kimi-dsh/dist/swarm-policy.js +0 -74
- package/plugins/kimi-dsh/dist/swarm-recovery.js +0 -166
- 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/util.js +0 -28
- 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,64 +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
|
-
|
|
15
|
+
Claude Code reviews this repository with Kimi and checks each finding against the working tree.
|
|
16
16
|
|
|
17
17
|
Choose a language below. Each guide opens on this page.
|
|
18
18
|
|
|
19
19
|
选择语言,展开阅读 · Choisissez votre langue · 言語を選んで開いてください
|
|
20
20
|
|
|
21
21
|
<details open>
|
|
22
|
-
<summary>English
|
|
22
|
+
<summary>English: get started</summary>
|
|
23
23
|
|
|
24
24
|
## Use Kimi in your coding tasks
|
|
25
25
|
|
|
26
|
-
Send questions, code reviews,
|
|
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.
|
|
27
27
|
|
|
28
|
-
The plugin runs Kimi on your
|
|
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.
|
|
29
29
|
|
|
30
|
-
Read-only tasks cannot edit files or run shell commands.
|
|
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.
|
|
31
31
|
|
|
32
32
|
## Before you install
|
|
33
33
|
|
|
34
34
|
You need:
|
|
35
35
|
|
|
36
36
|
- macOS or Linux
|
|
37
|
-
- Claude Code, Codex,
|
|
37
|
+
- Claude Code, Codex, Antigravity, DSH `>=0.2.1-rc.5 <0.3.0`, or Magpie (or any stdio MCP client)
|
|
38
38
|
- Node.js 22.5 or newer (24.9 or newer for DSH)
|
|
39
|
-
- Kimi Code CLI 2.
|
|
39
|
+
- Kimi Code CLI `2.8.0` or newer (this plugin certifies `2.8.0` for all 7 operations and refuses older versions)
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
This plugin does not support model runs on Windows. Contributors can run the [Windows diagnostics checks](./docs/ci.md#windows-spawn-controls).
|
|
42
42
|
|
|
43
|
-
|
|
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.
|
|
44
44
|
|
|
45
|
-
Run `kimi` in your terminal
|
|
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.
|
|
46
46
|
|
|
47
47
|
## Install in Claude Code
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
Run these commands in Claude Code inside your project:
|
|
50
50
|
|
|
51
51
|
```text
|
|
52
52
|
/plugin marketplace add linxule/kimi-plugin-cc
|
|
53
53
|
/plugin install kimi@kimi-marketplace
|
|
54
|
-
/kimi:setup
|
|
55
|
-
/kimi:setup --check
|
|
56
54
|
```
|
|
57
55
|
|
|
58
|
-
|
|
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:
|
|
59
57
|
|
|
60
58
|
```text
|
|
61
|
-
|
|
59
|
+
Run kimi_setup with action "install", then action "check".
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Check that the `Probe:` line shows `ok`. Then try a read-only question:
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
Use Kimi to explain how this project's main entry point works.
|
|
62
66
|
```
|
|
63
67
|
|
|
64
68
|
## Install in Codex
|
|
@@ -70,238 +74,202 @@ codex plugin marketplace add linxule/kimi-plugin-cc
|
|
|
70
74
|
codex plugin add kimi@kimi-marketplace
|
|
71
75
|
```
|
|
72
76
|
|
|
73
|
-
Open a new Codex task in your project and send:
|
|
74
|
-
|
|
75
|
-
```text
|
|
76
|
-
Use $kimi-setup to install the safety hook, then check readiness.
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
The `Probe:` line should show `ok`. Then try:
|
|
77
|
+
Open a new Codex task in your project and send this prompt:
|
|
80
78
|
|
|
81
79
|
```text
|
|
82
|
-
Use $kimi
|
|
80
|
+
Use $kimi to run kimi_setup (install, then check), then explain how this project's main entry point works.
|
|
83
81
|
```
|
|
84
82
|
|
|
85
|
-
## Install in
|
|
86
|
-
|
|
87
|
-
DSH needs patched host and profile dependencies (`zod >=4.6.6`, `undici >=8.12.2`). Follow the [host installation and audit instructions](./docs/registry-releases.md#patched-dsh-host-and-profiles) first.
|
|
83
|
+
## Install in Antigravity
|
|
88
84
|
|
|
89
|
-
|
|
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`:
|
|
90
86
|
|
|
91
87
|
```sh
|
|
92
|
-
|
|
88
|
+
ln -sfn /path/to/kimi-plugin-cc ~/.gemini/config/plugins/kimi
|
|
93
89
|
```
|
|
94
90
|
|
|
95
|
-
|
|
91
|
+
Restart Antigravity or reload its plugins. Then ask Antigravity to run `kimi_setup` with `action: "install"` and `action: "check"`.
|
|
96
92
|
|
|
97
|
-
|
|
93
|
+
## Install in DeepSeek Harness
|
|
98
94
|
|
|
99
|
-
|
|
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.
|
|
100
96
|
|
|
101
|
-
|
|
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`:
|
|
102
98
|
|
|
103
99
|
```sh
|
|
104
|
-
|
|
105
|
-
claude --plugin-dir ~/.local/share/kimi-plugin-cc/node_modules/kimi-plugin-cc
|
|
100
|
+
dsh plugin --profile web add kimi-plugin-cc
|
|
106
101
|
```
|
|
107
102
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
## Use Kimi from an agent
|
|
111
|
-
|
|
112
|
-
The plugin includes an MCP server for Claude Code and Codex. If you are an agent, prefer these tools for long-running work: a job keeps running if the connection drops, and a client that supports MCP tasks is notified when it finishes. Other clients get a `job_id` to check.
|
|
113
|
-
|
|
114
|
-
| Tool | What it does | Can it write? |
|
|
115
|
-
| --- | --- | --- |
|
|
116
|
-
| `kimi_ask` | Answers a question about the repository | No |
|
|
117
|
-
| `kimi_review` | Reviews changes. `mode: "challenge"` questions the approach instead | No |
|
|
118
|
-
| `kimi_rescue` | Investigates or makes a bounded fix | Workspace files, never Git |
|
|
119
|
-
| `kimi_pursue` | Works toward an objective over several turns (experimental) | Workspace files, never Git |
|
|
120
|
-
| `kimi_swarm` | Runs parallel read-only checks across independent targets | No |
|
|
121
|
-
| `kimi_swarm_write` | Runs parallel edits in a temporary Git worktree | Returns a patch. It does not apply it |
|
|
122
|
-
|
|
123
|
-
Use `kimi_job_status`, `kimi_job_result` and `kimi_job_cancel` to follow or stop a job. A result can include `warnings`: pass them on to the user.
|
|
124
|
-
|
|
125
|
-
`kimi_ask`, `kimi_review` and `kimi_swarm` accept `read_roots` and `network`. See [Limit what a task can read and reach](#limit-what-a-task-can-read-and-reach).
|
|
126
|
-
|
|
127
|
-
When the host gives no default project directory, as in Codex, pass an absolute `workspace` path.
|
|
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`.
|
|
128
104
|
|
|
129
|
-
##
|
|
105
|
+
## Install in Magpie and other MCP clients
|
|
130
106
|
|
|
131
|
-
|
|
132
|
-
| --- | --- |
|
|
133
|
-
| `/kimi:task` | Answers a question. Add `--write` to let Kimi edit files in your workspace |
|
|
134
|
-
| `/kimi:review` | Reviews your working tree, or a branch with `--base <ref>`. Add `--challenge` to question the approach |
|
|
135
|
-
| `/kimi:pursue` | Works toward an objective over several turns, within a time budget (experimental). It can edit workspace files |
|
|
136
|
-
| `/kimi:swarm` | Runs parallel read-only checks. Add `--write` to prepare parallel edits as a patch |
|
|
137
|
-
| `/kimi:setup` | Installs or checks the hook, lists models, and installs Kimi |
|
|
138
|
-
| `/kimi:status`, `/kimi:result`, `/kimi:cancel`, `/kimi:replay` | Follow, read, stop or replay a task |
|
|
107
|
+
Register `scripts/companion.sh mcp` as a local stdio MCP server for agents such as Copilot, Cursor, and Grok:
|
|
139
108
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
- `/kimi:ask` is now `/kimi:task`
|
|
145
|
-
- `/kimi:rescue` is now `/kimi:task --write`
|
|
146
|
-
- `/kimi:challenge` is now `/kimi:review --challenge`
|
|
147
|
-
- the `kimi_challenge` MCP tool is now `kimi_review` with `mode: "challenge"`
|
|
148
|
-
|
|
149
|
-
In Codex, use the nine skills, such as `$kimi-task` and `$kimi-review`. In DSH, the seven tools are unchanged, including `kimi_challenge`.
|
|
150
|
-
|
|
151
|
-
`/kimi:task` can continue a session: `/kimi:task -r Explain the next step.`
|
|
152
|
-
|
|
153
|
-
## Limit what a task can read and reach
|
|
109
|
+
```sh
|
|
110
|
+
magpie library mcp add kimi /path/to/kimi-plugin-cc/scripts/companion.sh mcp agents=copilot,cursor,grok --local
|
|
111
|
+
```
|
|
154
112
|
|
|
155
|
-
|
|
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.
|
|
156
114
|
|
|
157
|
-
`/kimi
|
|
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.
|
|
158
116
|
|
|
159
|
-
|
|
160
|
-
- `--network` allows web search and fetching public web pages. It also limits file reads to your workspace and any `--read-root` directories
|
|
117
|
+
## Install from npm
|
|
161
118
|
|
|
162
|
-
|
|
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:
|
|
163
120
|
|
|
164
|
-
|
|
121
|
+
```sh
|
|
122
|
+
npm install --prefix ~/.local/share/kimi-plugin-cc-pkg kimi-plugin-cc@3.1.1
|
|
123
|
+
claude --plugin-dir ~/.local/share/kimi-plugin-cc-pkg/node_modules/kimi-plugin-cc
|
|
124
|
+
```
|
|
165
125
|
|
|
166
|
-
|
|
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).
|
|
167
127
|
|
|
168
|
-
|
|
128
|
+
## Use Kimi with MCP
|
|
169
129
|
|
|
170
|
-
-
|
|
171
|
-
- `/kimi:task --write`, `/kimi:pursue` and `/kimi:swarm` refuse with `KIMI_CAPABILITY_NOT_CERTIFIED`
|
|
172
|
-
- `--network` refuses
|
|
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`):
|
|
173
131
|
|
|
174
|
-
|
|
132
|
+
| Tool | Modes or actions | Can it write files |
|
|
133
|
+
| --- | --- | --- |
|
|
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 |
|
|
175
138
|
|
|
176
|
-
|
|
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.
|
|
177
140
|
|
|
178
|
-
|
|
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`.
|
|
179
142
|
|
|
180
|
-
|
|
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.
|
|
181
144
|
|
|
182
|
-
|
|
145
|
+
## Use Kimi from the terminal
|
|
183
146
|
|
|
184
|
-
|
|
147
|
+
Run the 5 primary CLI subcommands through `scripts/companion.sh`:
|
|
185
148
|
|
|
186
|
-
|
|
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 |
|
|
187
156
|
|
|
188
|
-
|
|
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.
|
|
189
158
|
|
|
190
|
-
|
|
159
|
+
## Point a task at an earlier session
|
|
191
160
|
|
|
192
|
-
Pass
|
|
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`:
|
|
193
162
|
|
|
194
|
-
```
|
|
195
|
-
/
|
|
163
|
+
```sh
|
|
164
|
+
scripts/companion.sh read --reference-session <job-id> -- Continue the migration from where that session stopped.
|
|
196
165
|
```
|
|
197
166
|
|
|
198
|
-
|
|
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.
|
|
199
168
|
|
|
200
|
-
##
|
|
169
|
+
## Limit what a task can read and reach
|
|
201
170
|
|
|
202
|
-
|
|
203
|
-
| --- | --- | --- | --- |
|
|
204
|
-
| Check progress | `/kimi:status` | `$kimi-status` | `/kimi-status` |
|
|
205
|
-
| Read the result | `/kimi:result` | `$kimi-result` | `/kimi-result` |
|
|
206
|
-
| Cancel | `/kimi:cancel` | `$kimi-cancel` | `/kimi-cancel` |
|
|
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:
|
|
207
172
|
|
|
208
|
-
|
|
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
|
|
209
175
|
|
|
210
|
-
|
|
176
|
+
Write tasks reject both options. Read and network limits apply to one run only and never carry over to resumed turns.
|
|
211
177
|
|
|
212
|
-
##
|
|
178
|
+
## Keep Kimi working when Kimi updates
|
|
213
179
|
|
|
214
|
-
|
|
180
|
+
Plugin 3.1.0 uses a rolling compatibility window starting at Kimi Code `2.8.0`:
|
|
215
181
|
|
|
216
|
-
|
|
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
|
|
217
186
|
|
|
218
|
-
|
|
219
|
-
codex plugin marketplace upgrade kimi-marketplace
|
|
220
|
-
codex plugin add kimi@kimi-marketplace
|
|
221
|
-
```
|
|
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`.
|
|
222
188
|
|
|
223
|
-
|
|
189
|
+
## Share one data directory and safety hook
|
|
224
190
|
|
|
225
|
-
|
|
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`.
|
|
226
192
|
|
|
227
|
-
|
|
193
|
+
Running `setup` once publishes the bundled hook and writes one `# === BEGIN kimi-plugin-cc-managed (v3.1.1) ===` 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`.
|
|
228
194
|
|
|
229
|
-
|
|
195
|
+
## Manage sessions, models, and jobs
|
|
230
196
|
|
|
231
|
-
|
|
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.
|
|
232
198
|
|
|
233
|
-
|
|
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.
|
|
234
200
|
|
|
235
|
-
|
|
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.
|
|
236
202
|
|
|
237
|
-
|
|
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).
|
|
238
204
|
|
|
239
|
-
|
|
205
|
+
## Understand the safety limits
|
|
240
206
|
|
|
241
|
-
|
|
207
|
+
One PreToolUse safety hook checks every Kimi tool call:
|
|
242
208
|
|
|
243
|
-
- read-only tasks
|
|
244
|
-
- tasks
|
|
245
|
-
-
|
|
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
|
|
246
212
|
|
|
247
213
|
The plugin does not:
|
|
248
214
|
|
|
249
|
-
- limit
|
|
250
|
-
-
|
|
251
|
-
-
|
|
252
|
-
-
|
|
253
|
-
|
|
254
|
-
Only run tasks that write in repositories you trust.
|
|
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
|
|
255
219
|
|
|
256
|
-
|
|
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).
|
|
257
221
|
|
|
258
|
-
##
|
|
222
|
+
## Report issues and contribute
|
|
259
223
|
|
|
260
|
-
Report bugs or
|
|
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).
|
|
261
225
|
|
|
262
226
|
</details>
|
|
263
227
|
|
|
264
228
|
<details>
|
|
265
|
-
<summary
|
|
229
|
+
<summary>简体中文:开始使用</summary>
|
|
266
230
|
|
|
267
231
|
## 在编码任务中使用 Kimi
|
|
268
232
|
|
|
269
|
-
|
|
233
|
+
你可以将代码提问、变更审查、设计质疑、工作区修复、多步目标和并行任务发送给本地 Kimi Code CLI。支持从 Claude Code、Codex、Antigravity、DeepSeek Harness(DSH)或 Magpie 直接调用 Kimi。
|
|
270
234
|
|
|
271
|
-
|
|
235
|
+
插件使用你自己的 Kimi 订阅或 API 密钥在本地运行 Kimi,绝不会改动宿主应用的登录状态。你的 Kimi 服务商只会收到当前任务读取的提示词和代码。
|
|
272
236
|
|
|
273
|
-
只读任务不能编辑文件或运行 shell
|
|
237
|
+
只读任务不能编辑文件或运行 shell 命令。写入任务只能在你的工作区或临时 Git 工作树内编辑文件,且绝不改动 Git 历史。
|
|
274
238
|
|
|
275
239
|
## 安装前准备
|
|
276
240
|
|
|
277
|
-
|
|
241
|
+
你需要准备以下环境:
|
|
278
242
|
|
|
279
243
|
- macOS 或 Linux
|
|
280
|
-
-
|
|
281
|
-
- Node.js 22.5 或更高版本(DSH
|
|
282
|
-
- Kimi Code CLI 2.
|
|
244
|
+
- Claude Code、Codex、Antigravity、DSH `>=0.2.1-rc.5 <0.3.0` 或 Magpie(或任何 stdio MCP 客户端)
|
|
245
|
+
- Node.js 22.5 或更高版本(DSH 需要 24.9 或更高版本)
|
|
246
|
+
- Kimi Code CLI `2.8.0` 或更高版本(本插件对 `2.8.0` 认证了全部 7 项操作,并拒绝更早版本)
|
|
283
247
|
|
|
284
|
-
|
|
248
|
+
Windows 不支持运行模型任务。贡献者可以运行 [Windows 诊断检查](./docs/ci.md#windows-spawn-controls)。
|
|
285
249
|
|
|
286
|
-
|
|
250
|
+
你可以按照 [Kimi Code 入门指南](https://www.kimi.com/code/docs/en/kimi-code-cli/getting-started) 安装 Kimi Code,也可以让 `kimi_setup` 自动安装已认证的 `2.8.0` 二进制文件。无需安装 Bun,也无需执行构建步骤。
|
|
287
251
|
|
|
288
|
-
|
|
252
|
+
先在终端运行 `kimi`,使用 `/login` 登录 Kimi 订阅,或使用 `/provider` 配置 API 密钥。请只在 Kimi 终端中输入凭据,切勿在助手对话中粘贴密钥。如果设置了 `KIMI_CODE_HOME`,请确保 Kimi 和本插件使用同一个目录。
|
|
289
253
|
|
|
290
254
|
## 在 Claude Code 中安装
|
|
291
255
|
|
|
292
|
-
|
|
256
|
+
在项目目录中打开 Claude Code 并运行:
|
|
293
257
|
|
|
294
258
|
```text
|
|
295
259
|
/plugin marketplace add linxule/kimi-plugin-cc
|
|
296
260
|
/plugin install kimi@kimi-marketplace
|
|
297
|
-
/kimi:setup
|
|
298
|
-
/kimi:setup --check
|
|
299
261
|
```
|
|
300
262
|
|
|
301
|
-
|
|
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
|
+
```
|
|
268
|
+
|
|
269
|
+
确认输出中的 `Probe:` 行显示 `ok`,然后尝试一个只读提问:
|
|
302
270
|
|
|
303
271
|
```text
|
|
304
|
-
|
|
272
|
+
Use Kimi to explain how this project's main entry point works.
|
|
305
273
|
```
|
|
306
274
|
|
|
307
275
|
## 在 Codex 中安装
|
|
@@ -313,238 +281,202 @@ codex plugin marketplace add linxule/kimi-plugin-cc
|
|
|
313
281
|
codex plugin add kimi@kimi-marketplace
|
|
314
282
|
```
|
|
315
283
|
|
|
316
|
-
|
|
284
|
+
在项目中打开一个新的 Codex 任务并发送:
|
|
317
285
|
|
|
318
286
|
```text
|
|
319
|
-
Use $kimi
|
|
287
|
+
Use $kimi to run kimi_setup (install, then check), then explain how this project's main entry point works.
|
|
320
288
|
```
|
|
321
289
|
|
|
322
|
-
|
|
290
|
+
## 在 Antigravity 中安装
|
|
323
291
|
|
|
324
|
-
|
|
325
|
-
Use $kimi-task to explain how this project's main entry point works.
|
|
326
|
-
```
|
|
327
|
-
|
|
328
|
-
## 在 DeepSeek Harness 中安装
|
|
329
|
-
|
|
330
|
-
DSH 需要打过补丁的宿主与配置集依赖项(`zod >=4.6.6`、`undici >=8.12.2`)。请先按照[宿主安装与审计说明](./docs/registry-releases.md#patched-dsh-host-and-profiles)操作。
|
|
331
|
-
|
|
332
|
-
在本仓库的检出目录中运行:
|
|
292
|
+
将仓库根目录软链接或复制到 Antigravity 的插件目录。根目录包含 `plugin.json`、`mcp_config.json`、`assets/logo.svg` 和 `skills/kimi/SKILL.md`:
|
|
333
293
|
|
|
334
294
|
```sh
|
|
335
|
-
|
|
295
|
+
ln -sfn /path/to/kimi-plugin-cc ~/.gemini/config/plugins/kimi
|
|
336
296
|
```
|
|
337
297
|
|
|
338
|
-
|
|
298
|
+
重启 Antigravity 或重新加载插件,然后让 Antigravity 调用 `kimi_setup`(先运行 `action: "install"`,再运行 `action: "check"`)。
|
|
339
299
|
|
|
340
|
-
|
|
300
|
+
## 在 DeepSeek Harness 中安装
|
|
341
301
|
|
|
342
|
-
|
|
302
|
+
安装插件前,请先将 DSH 宿主与配置文件依赖更新到 `zod >=4.6.6` 和 `undici >=8.12.2`。请先按照 [DSH 宿主与配置补丁指南](./docs/safety.md#patched-dsh-host-and-profiles) 完成更新。
|
|
343
303
|
|
|
344
|
-
|
|
304
|
+
从 npm 或本地检出安装根包。DSH 会通过 `@deepseek-ai/dsh-mcp-client` 和 `@deepseek-ai/dsh-skill-filesystem` 直接加载根目录下的 `cordis.patch.yml`:
|
|
345
305
|
|
|
346
306
|
```sh
|
|
347
|
-
|
|
348
|
-
claude --plugin-dir ~/.local/share/kimi-plugin-cc/node_modules/kimi-plugin-cc
|
|
307
|
+
dsh plugin --profile web add kimi-plugin-cc
|
|
349
308
|
```
|
|
350
309
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
## 从智能体使用 Kimi
|
|
354
|
-
|
|
355
|
-
插件包含面向 Claude Code 和 Codex 的 MCP 服务器。如果你是智能体,处理耗时较长的工作时请优先使用这些工具:即使连接断开,作业也会继续运行;支持 MCP 任务的客户端会在作业完成时收到通知。其他客户端会获得一个可供查询的 `job_id`。
|
|
356
|
-
|
|
357
|
-
| 工具 | 作用 | 能否写入? |
|
|
358
|
-
| --- | --- | --- |
|
|
359
|
-
| `kimi_ask` | 回答关于代码仓库的问题 | 否 |
|
|
360
|
-
| `kimi_review` | 审查改动。`mode: "challenge"` 则改为质疑实现方案 | 否 |
|
|
361
|
-
| `kimi_rescue` | 排查问题或执行限定范围的修复 | 工作区文件,绝不修改 Git |
|
|
362
|
-
| `kimi_pursue` | 通过多轮执行推进目标(实验性) | 工作区文件,绝不修改 Git |
|
|
363
|
-
| `kimi_swarm` | 针对多个独立目标并行运行只读检查 | 否 |
|
|
364
|
-
| `kimi_swarm_write` | 在临时 Git 工作树中并行执行编辑 | 返回补丁。不会应用该补丁 |
|
|
365
|
-
|
|
366
|
-
使用 `kimi_job_status`、`kimi_job_result` 和 `kimi_job_cancel` 跟进或停止作业。结果可能包含 `warnings`:请将其转达给用户。
|
|
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`。
|
|
367
311
|
|
|
368
|
-
|
|
312
|
+
## 在 Magpie 和其他 MCP 客户端中安装
|
|
369
313
|
|
|
370
|
-
|
|
314
|
+
将 `scripts/companion.sh mcp` 注册为本地 stdio MCP 服务器,供 Copilot、Cursor 和 Grok 等代理调用:
|
|
371
315
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
| --- | --- |
|
|
376
|
-
| `/kimi:task` | 回答问题。加上 `--write` 可让 Kimi 编辑工作区中的文件 |
|
|
377
|
-
| `/kimi:review` | 审查工作树,或配合 `--base <ref>` 审查分支。加上 `--challenge` 可质疑实现方案 |
|
|
378
|
-
| `/kimi:pursue` | 在时间预算内通过多轮执行推进目标(实验性)。它可以编辑工作区文件 |
|
|
379
|
-
| `/kimi:swarm` | 并行运行只读检查。加上 `--write` 可将并行编辑准备为补丁 |
|
|
380
|
-
| `/kimi:setup` | 安装或检查钩子、列出模型,以及安装 Kimi |
|
|
381
|
-
| `/kimi:status`、`/kimi:result`、`/kimi:cancel`、`/kimi:replay` | 跟进、读取、停止或回放任务 |
|
|
382
|
-
|
|
383
|
-
请将 `--write` 或 `--challenge` 放在提示词前面。
|
|
384
|
-
|
|
385
|
-
3.0 版本合并了部分命令:
|
|
386
|
-
|
|
387
|
-
- `/kimi:ask` 现已改为 `/kimi:task`
|
|
388
|
-
- `/kimi:rescue` 现已改为 `/kimi:task --write`
|
|
389
|
-
- `/kimi:challenge` 现已改为 `/kimi:review --challenge`
|
|
390
|
-
- MCP 工具 `kimi_challenge` 现已改为带 `mode: "challenge"` 的 `kimi_review`
|
|
391
|
-
|
|
392
|
-
在 Codex 中,请使用九个技能,例如 `$kimi-task` 和 `$kimi-review`。在 DSH 中,包括 `kimi_challenge` 在内的七个工具保持不变。
|
|
393
|
-
|
|
394
|
-
`/kimi:task` 可以继续已有会话:`/kimi:task -r Explain the next step.`
|
|
395
|
-
|
|
396
|
-
## 限制任务可读取和访问的范围
|
|
316
|
+
```sh
|
|
317
|
+
magpie library mcp add kimi /path/to/kimi-plugin-cc/scripts/companion.sh mcp agents=copilot,cursor,grok --local
|
|
318
|
+
```
|
|
397
319
|
|
|
398
|
-
|
|
320
|
+
如果 `claude`、`codex`、`antigravity` 或 `dsh` 已经直接加载了 Kimi 插件,请不要在 Magpie 中添加它们,以免服务器名称冲突。
|
|
399
321
|
|
|
400
|
-
`/kimi
|
|
322
|
+
随后在终端中运行一次 `/path/to/kimi-plugin-cc/scripts/companion.sh setup` 和 `setup --check`,或者直接让代理调用 `kimi_setup`。
|
|
401
323
|
|
|
402
|
-
|
|
403
|
-
- `--network` 允许网页搜索和抓取公开网页。它同时会将文件读取范围限制在你的工作区和所有 `--read-root` 目录内
|
|
324
|
+
## 从 npm 安装
|
|
404
325
|
|
|
405
|
-
|
|
326
|
+
你也可以从 npm 安装 [`kimi-plugin-cc` 包](https://www.npmjs.com/package/kimi-plugin-cc) 到单独的包目录中。请将该目录与存放共享运行时数据的 `~/.local/share/kimi-plugin-cc` 分开:
|
|
406
327
|
|
|
407
|
-
|
|
328
|
+
```sh
|
|
329
|
+
npm install --prefix ~/.local/share/kimi-plugin-cc-pkg kimi-plugin-cc@3.1.1
|
|
330
|
+
claude --plugin-dir ~/.local/share/kimi-plugin-cc-pkg/node_modules/kimi-plugin-cc
|
|
331
|
+
```
|
|
408
332
|
|
|
409
|
-
|
|
333
|
+
请勿在同一个宿主中同时加载 npm 副本和已启用的插件市场副本。维护者请参阅 [npm 发布指南](./docs/ci.md#npm-oidc-publishing)。
|
|
410
334
|
|
|
411
|
-
|
|
335
|
+
## 通过 MCP 使用 Kimi
|
|
412
336
|
|
|
413
|
-
-
|
|
414
|
-
- `/kimi:task --write`、`/kimi:pursue` 和 `/kimi:swarm` 会以 `KIMI_CAPABILITY_NOT_CERTIFIED` 拒绝执行
|
|
415
|
-
- `--network` 会拒绝执行
|
|
337
|
+
所有宿主共享相同的 4 个 MCP 工具,并支持完整的 `SEP-2640` 技能发现(通过 `skills/list`、`skills/get`、`resources/list` 和 `resources/read` 读取 `skill://kimi/SKILL.md` 与 `skill://kimi/agents/openai.yaml`):
|
|
416
338
|
|
|
417
|
-
|
|
339
|
+
| 工具 | 模式或操作 | 是否写入文件 |
|
|
340
|
+
| --- | --- | --- |
|
|
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 或会话预览 |
|
|
418
345
|
|
|
419
|
-
|
|
346
|
+
对 `kimi_read` 和 `kimi_write` 的标准 `tools/call` 请求默认最多等待 50 秒(`wait: true`),并直接返回结果文本。你可以将 `wait_timeout_ms` 调高至 `86400000` 毫秒(24 小时)。如果客户端断开连接或取消等待,插件会停止轮询,而后台 Kimi 任务会继续运行。
|
|
420
347
|
|
|
421
|
-
|
|
348
|
+
在并行启动多个任务时,传入 `wait: false` 可以立即获得 `{ job_id }`。随后你可以用 `kimi_job` 查看、等待或停止每个任务。支持 MCP `2026-07-28` 任务协议(`io.modelcontextprotocol/tasks`)的客户端会直接收到可用于 `tasks/get` 和 `tasks/cancel` 的原生任务句柄。
|
|
422
349
|
|
|
423
|
-
|
|
350
|
+
当宿主没有设置默认项目目录时,请传入绝对路径 `workspace`。收到任何 `Warnings:` 警告块时,请原样转达给用户。
|
|
424
351
|
|
|
425
|
-
|
|
352
|
+
## 在终端中使用 Kimi
|
|
426
353
|
|
|
427
|
-
|
|
354
|
+
你可以通过 `scripts/companion.sh` 直接运行 5 个主 CLI 子命令:
|
|
428
355
|
|
|
429
|
-
|
|
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 服务器 |
|
|
430
363
|
|
|
431
|
-
|
|
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
|
-
```
|
|
438
|
-
/
|
|
370
|
+
```sh
|
|
371
|
+
scripts/companion.sh read --reference-session <job-id> -- Continue the migration from where that session stopped.
|
|
439
372
|
```
|
|
440
373
|
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
## 查看或取消任务
|
|
374
|
+
Kimi 会收到每个会话主日志的路径,并按需读取内容。当你设置了 `read_roots` 或 `network` 时,插件会将每个被引用会话的 `agents/main` 目录加入允许读取的根目录列表。请仅在这些会话日志内容允许离开本机时,才将其与 `network` 一起使用。
|
|
444
375
|
|
|
445
|
-
|
|
446
|
-
| --- | --- | --- | --- |
|
|
447
|
-
| 查看进度 | `/kimi:status` | `$kimi-status` | `/kimi-status` |
|
|
448
|
-
| 读取结果 | `/kimi:result` | `$kimi-result` | `/kimi-result` |
|
|
449
|
-
| 取消 | `/kimi:cancel` | `$kimi-cancel` | `/kimi-cancel` |
|
|
376
|
+
## 限制任务的读取范围和网络访问
|
|
450
377
|
|
|
451
|
-
|
|
378
|
+
默认情况下,只读任务可以读取当前系统用户有权读取的任何文件,且不能访问互联网。你可以通过以下 2 个选项限制 `kimi_read`(`ask`、`review`、`challenge` 和 `swarm`)与 `companion.sh read`:
|
|
452
379
|
|
|
453
|
-
|
|
380
|
+
- `read_roots` 或 `--read-root <abs-dir>`(可重复)将 `Read`、`Grep`、`Glob` 和 `ReadMediaFile` 限制在工作区和列出的目录内
|
|
381
|
+
- `network: true` 或 `--network` 允许 `WebSearch` 和 `FetchURL` 访问公共主机,并将上述 4 个读取工具限制在工作区和列出的读取目录内
|
|
454
382
|
|
|
455
|
-
|
|
383
|
+
写入任务不接受这两个选项。读取范围和网络限制仅对单次运行生效,不会继承到后续恢复的会话轮次。
|
|
456
384
|
|
|
457
|
-
在
|
|
385
|
+
## 在 Kimi 更新时保持兼容
|
|
458
386
|
|
|
459
|
-
|
|
387
|
+
插件 3.1.0 采用从 Kimi Code `2.8.0` 起算的滚动兼容窗口:
|
|
460
388
|
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
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` 的版本会拒绝所有操作
|
|
465
393
|
|
|
466
|
-
|
|
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`。
|
|
467
395
|
|
|
468
|
-
|
|
396
|
+
## 共享单一数据目录和安全钩子
|
|
469
397
|
|
|
470
|
-
|
|
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` 下。
|
|
471
399
|
|
|
472
|
-
|
|
400
|
+
运行一次 `setup` 即可发布打包好的安全钩子,并在 `~/.kimi-code/config.toml` 中写入单一的 `# === BEGIN kimi-plugin-cc-managed (v3.1.1) ===` 配置块,同时自动合并 3.0 版本遗留的 `:<host-id>` 配置块。共享同一个 Node 二进制文件的宿主只需运行一次 `setup`。如果不同宿主解析到不同的 Node 路径,请通过 `KIMI_PLUGIN_CC_NODE_BIN` 将它们指向同一个 Node 可执行文件。
|
|
473
401
|
|
|
474
|
-
|
|
402
|
+
## 管理会话、模型和任务
|
|
475
403
|
|
|
476
|
-
|
|
404
|
+
会话会显示在 Kimi Code Desktop 和 `kimi web` 中,并以你的原始请求作为预览文本。运行 `kimi_setup({ action: "repair_sessions" })` 或 `scripts/companion.sh setup --repair-sessions [--apply] [--all]` 可以修复缺失的预览。详见 [会话可见性与标题](./docs/session-visibility.md)。
|
|
477
405
|
|
|
478
|
-
|
|
406
|
+
使用 `kimi_setup({ action: "models" })` 或 `scripts/companion.sh setup --models [--json]` 可以在本地离线列出已配置的模型别名。在 MCP 中传入 `model` 或在 CLI 中传入 `-m` 可为单次运行指定模型,也可在 `kimi` 内部运行 `/model` 更改默认模型。详见 [模型选择指南](./docs/models.md)。
|
|
479
407
|
|
|
480
|
-
|
|
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)。
|
|
481
409
|
|
|
482
|
-
|
|
410
|
+
如需移除托管的安全钩子,请运行 `scripts/companion.sh setup --uninstall`。如果你正从 3.0 版本升级,请参阅 [从 3.0 升级到 3.1](./docs/migration.md#upgrading-from-30-to-31)。
|
|
483
411
|
|
|
484
|
-
|
|
412
|
+
## 了解安全边界
|
|
485
413
|
|
|
486
|
-
|
|
487
|
-
- 写入任务只能修改工作区内的文件,且不能更改 Git 状态
|
|
488
|
-
- 写入型 swarm基于你的最新提交在临时 Git 工作树中运行,并返回补丁。它不会应用该补丁
|
|
414
|
+
单一的 PreToolUse 安全钩子会检查每一次 Kimi 工具调用:
|
|
489
415
|
|
|
490
|
-
|
|
416
|
+
- 只读任务禁止修改文件和运行 shell 命令
|
|
417
|
+
- 写入任务只能在工作区内修改文件,且绝不改动 Git 状态
|
|
418
|
+
- `swarm_patch` 在基于 `HEAD` 的临时 Git 工作树内修改文件,并返回未应用的补丁
|
|
491
419
|
|
|
492
|
-
|
|
493
|
-
- 查看网址的最终指向:公开地址可能会重定向到私有地址
|
|
494
|
-
- 充当沙盒:写入任务可以运行测试及类似命令,而这些命令会执行仓库中的代码
|
|
495
|
-
- 提交任何内容。保留改动前请先自行审查
|
|
420
|
+
本插件不会执行以下操作:
|
|
496
421
|
|
|
497
|
-
|
|
422
|
+
- 除非设置了 `read_roots` 或 `network`,否则不限制文件读取范围
|
|
423
|
+
- 在 `FetchURL` 校验字面 URL 之后,不检查 DNS 解析结果或 HTTP 重定向目标
|
|
424
|
+
- 不对写入任务启动的仓库测试运行器进行操作系统级沙箱隔离
|
|
425
|
+
- 不自动应用补丁,也不创建 Git 提交
|
|
498
426
|
|
|
499
|
-
|
|
427
|
+
请仅在受信任的代码仓库中运行写入任务。关于拒绝码和版本历史,请参阅 [安全性与拒绝码](./docs/safety.md#native-v2-refusal-codes) 和 [更新日志](./CHANGELOG.md)。
|
|
500
428
|
|
|
501
|
-
##
|
|
429
|
+
## 报告问题与参与贡献
|
|
502
430
|
|
|
503
|
-
|
|
431
|
+
欢迎在 [GitHub issues](https://github.com/linxule/kimi-plugin-cc/issues) 中报告缺陷或提出改进建议。贡献者可以阅读 [运行时不变量](./docs/invariants.md) 和 [持续集成说明](./docs/ci.md)。
|
|
504
432
|
|
|
505
433
|
</details>
|
|
506
434
|
|
|
507
435
|
<details>
|
|
508
|
-
<summary>Français
|
|
436
|
+
<summary>Français : bien démarrer</summary>
|
|
509
437
|
|
|
510
438
|
## Utiliser Kimi dans vos tâches de développement
|
|
511
439
|
|
|
512
|
-
Envoyez
|
|
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.
|
|
513
441
|
|
|
514
|
-
Le plugin exécute Kimi sur votre
|
|
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.
|
|
515
443
|
|
|
516
|
-
Les tâches en lecture seule ne peuvent ni modifier de fichiers ni
|
|
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.
|
|
517
445
|
|
|
518
|
-
## Avant
|
|
446
|
+
## Avant d'installer
|
|
519
447
|
|
|
520
|
-
|
|
448
|
+
Vous avez besoin des éléments suivants :
|
|
521
449
|
|
|
522
450
|
- macOS ou Linux
|
|
523
|
-
- Claude Code, Codex
|
|
451
|
+
- Claude Code, Codex, Antigravity, DSH `>=0.2.1-rc.5 <0.3.0` ou Magpie (ou tout client MCP stdio)
|
|
524
452
|
- Node.js 22.5 ou plus récent (24.9 ou plus récent pour DSH)
|
|
525
|
-
- Kimi Code CLI 2.
|
|
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)
|
|
526
454
|
|
|
527
|
-
|
|
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).
|
|
528
456
|
|
|
529
|
-
|
|
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.
|
|
530
458
|
|
|
531
|
-
|
|
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.
|
|
532
460
|
|
|
533
461
|
## Installer dans Claude Code
|
|
534
462
|
|
|
535
|
-
|
|
463
|
+
Exécutez ces commandes dans Claude Code depuis votre projet :
|
|
536
464
|
|
|
537
465
|
```text
|
|
538
466
|
/plugin marketplace add linxule/kimi-plugin-cc
|
|
539
467
|
/plugin install kimi@kimi-marketplace
|
|
540
|
-
/kimi:setup
|
|
541
|
-
/kimi:setup --check
|
|
542
468
|
```
|
|
543
469
|
|
|
544
|
-
|
|
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é :
|
|
471
|
+
|
|
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 :
|
|
545
477
|
|
|
546
478
|
```text
|
|
547
|
-
|
|
479
|
+
Use Kimi to explain how this project's main entry point works.
|
|
548
480
|
```
|
|
549
481
|
|
|
550
482
|
## Installer dans Codex
|
|
@@ -556,440 +488,364 @@ codex plugin marketplace add linxule/kimi-plugin-cc
|
|
|
556
488
|
codex plugin add kimi@kimi-marketplace
|
|
557
489
|
```
|
|
558
490
|
|
|
559
|
-
Ouvrez une nouvelle tâche Codex dans votre projet et envoyez :
|
|
491
|
+
Ouvrez une nouvelle tâche Codex dans votre projet et envoyez cette invite :
|
|
560
492
|
|
|
561
493
|
```text
|
|
562
|
-
Use $kimi
|
|
494
|
+
Use $kimi to run kimi_setup (install, then check), then explain how this project's main entry point works.
|
|
563
495
|
```
|
|
564
496
|
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
```text
|
|
568
|
-
Use $kimi-task to explain how this project's main entry point works.
|
|
569
|
-
```
|
|
570
|
-
|
|
571
|
-
## Installer dans DeepSeek Harness
|
|
572
|
-
|
|
573
|
-
DSH nécessite des dépendances corrigées pour l'hôte et les profils (`zod >=4.6.6`, `undici >=8.12.2`). Suivez d'abord les [instructions d'installation et d'audit de l'hôte](./docs/registry-releases.md#patched-dsh-host-and-profiles).
|
|
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
513
|
```sh
|
|
590
|
-
|
|
591
|
-
claude --plugin-dir ~/.local/share/kimi-plugin-cc/node_modules/kimi-plugin-cc
|
|
514
|
+
dsh plugin --profile web add kimi-plugin-cc
|
|
592
515
|
```
|
|
593
516
|
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
## Utiliser Kimi depuis un agent
|
|
597
|
-
|
|
598
|
-
Le plugin inclut un serveur MCP pour Claude Code et Codex. Si vous êtes un agent, privilégiez ces outils pour les traitements longs : un job continue de s'exécuter si la connexion est coupée, et un client qui prend en charge les tâches MCP est notifié lorsqu'il se termine. Les autres clients reçoivent un `job_id` à vérifier.
|
|
599
|
-
|
|
600
|
-
| Outil | Ce qu'il fait | Peut-il écrire ? |
|
|
601
|
-
| --- | --- | --- |
|
|
602
|
-
| `kimi_ask` | Répond à une question sur le dépôt | Non |
|
|
603
|
-
| `kimi_review` | Examine les modifications. `mode: "challenge"` remet plutôt en question l'approche | Non |
|
|
604
|
-
| `kimi_rescue` | Enquête ou applique un correctif délimité | Fichiers de l'espace de travail, jamais Git |
|
|
605
|
-
| `kimi_pursue` | Avance vers un objectif sur plusieurs tours (expérimental) | Fichiers de l'espace de travail, jamais Git |
|
|
606
|
-
| `kimi_swarm` | Exécute des vérifications parallèles en lecture seule sur des cibles indépendantes | Non |
|
|
607
|
-
| `kimi_swarm_write` | Exécute des modifications parallèles dans un arbre de travail Git temporaire | Renvoie un patch. Il ne l'applique pas |
|
|
608
|
-
|
|
609
|
-
Utilisez `kimi_job_status`, `kimi_job_result` et `kimi_job_cancel` pour suivre ou arrêter un job. Un résultat peut contenir des `warnings` : transmettez-les à l'utilisateur.
|
|
610
|
-
|
|
611
|
-
`kimi_ask`, `kimi_review` et `kimi_swarm` acceptent `read_roots` et `network`. Consultez [Limiter ce qu'une tâche peut lire et atteindre](#limiter-ce-quune-tâche-peut-lire-et-atteindre).
|
|
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`.
|
|
612
518
|
|
|
613
|
-
|
|
519
|
+
## Installer dans Magpie et d'autres clients MCP
|
|
614
520
|
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
| Commande | Ce qu'elle fait |
|
|
618
|
-
| --- | --- |
|
|
619
|
-
| `/kimi:task` | Répond à une question. Ajoutez `--write` pour laisser Kimi modifier les fichiers de votre espace de travail |
|
|
620
|
-
| `/kimi:review` | Examine votre arbre de travail, ou une branche avec `--base <ref>`. Ajoutez `--challenge` pour remettre en question l'approche |
|
|
621
|
-
| `/kimi:pursue` | Avance vers un objectif sur plusieurs tours, dans la limite d'un budget de temps (expérimental). Elle peut modifier les fichiers de l'espace de travail |
|
|
622
|
-
| `/kimi:swarm` | Exécute des vérifications parallèles en lecture seule. Ajoutez `--write` pour préparer des modifications parallèles sous forme de patch |
|
|
623
|
-
| `/kimi:setup` | Installe ou vérifie le hook, liste les modèles et installe Kimi |
|
|
624
|
-
| `/kimi:status`, `/kimi:result`, `/kimi:cancel`, `/kimi:replay` | Suivre, lire, arrêter ou rejouer une tâche |
|
|
521
|
+
Enregistrez `scripts/companion.sh mcp` comme serveur MCP stdio local pour des agents tels que Copilot, Cursor et Grok :
|
|
625
522
|
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
- `/kimi:ask` est désormais `/kimi:task`
|
|
631
|
-
- `/kimi:rescue` est désormais `/kimi:task --write`
|
|
632
|
-
- `/kimi:challenge` est désormais `/kimi:review --challenge`
|
|
633
|
-
- l'outil MCP `kimi_challenge` est désormais `kimi_review` avec `mode: "challenge"`
|
|
634
|
-
|
|
635
|
-
Dans Codex, utilisez les neuf compétences, telles que `$kimi-task` et `$kimi-review`. Dans DSH, les sept outils sont inchangés, y compris `kimi_challenge`.
|
|
636
|
-
|
|
637
|
-
`/kimi:task` peut poursuivre une session : `/kimi:task -r Explain the next step.`
|
|
638
|
-
|
|
639
|
-
## Limiter ce qu'une tâche peut lire et atteindre
|
|
523
|
+
```sh
|
|
524
|
+
magpie library mcp add kimi /path/to/kimi-plugin-cc/scripts/companion.sh mcp agents=copilot,cursor,grok --local
|
|
525
|
+
```
|
|
640
526
|
|
|
641
|
-
|
|
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.
|
|
642
528
|
|
|
643
|
-
`/kimi
|
|
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.
|
|
644
530
|
|
|
645
|
-
|
|
646
|
-
- `--network` autorise la recherche web et la récupération de pages web publiques. Elle limite aussi la lecture de fichiers à votre espace de travail et aux éventuels répertoires `--read-root`
|
|
531
|
+
## Installer depuis npm
|
|
647
532
|
|
|
648
|
-
|
|
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 :
|
|
649
534
|
|
|
650
|
-
|
|
535
|
+
```sh
|
|
536
|
+
npm install --prefix ~/.local/share/kimi-plugin-cc-pkg kimi-plugin-cc@3.1.1
|
|
537
|
+
claude --plugin-dir ~/.local/share/kimi-plugin-cc-pkg/node_modules/kimi-plugin-cc
|
|
538
|
+
```
|
|
651
539
|
|
|
652
|
-
|
|
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).
|
|
653
541
|
|
|
654
|
-
|
|
542
|
+
## Utiliser Kimi avec MCP
|
|
655
543
|
|
|
656
|
-
|
|
657
|
-
- `/kimi:task --write`, `/kimi:pursue` et `/kimi:swarm` refusent l'exécution avec `KIMI_CAPABILITY_NOT_CERTIFIED`
|
|
658
|
-
- `--network` est refusé
|
|
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`) :
|
|
659
545
|
|
|
660
|
-
|
|
546
|
+
| Outil | Modes ou actions | Écriture de fichiers |
|
|
547
|
+
| --- | --- | --- |
|
|
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 |
|
|
661
552
|
|
|
662
|
-
Les
|
|
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.
|
|
663
554
|
|
|
664
|
-
|
|
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`.
|
|
665
556
|
|
|
666
|
-
|
|
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.
|
|
667
558
|
|
|
668
|
-
|
|
559
|
+
## Utiliser Kimi depuis le terminal
|
|
669
560
|
|
|
670
|
-
|
|
561
|
+
Exécutez les 5 sous-commandes CLI principales via `scripts/companion.sh` :
|
|
671
562
|
|
|
672
|
-
|
|
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 |
|
|
673
570
|
|
|
674
|
-
|
|
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.
|
|
675
572
|
|
|
676
|
-
|
|
573
|
+
## Pointer une tâche vers une session précédente
|
|
677
574
|
|
|
678
|
-
Passez
|
|
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` :
|
|
679
576
|
|
|
680
|
-
```
|
|
681
|
-
/
|
|
577
|
+
```sh
|
|
578
|
+
scripts/companion.sh read --reference-session <job-id> -- Continue the migration from where that session stopped.
|
|
682
579
|
```
|
|
683
580
|
|
|
684
|
-
|
|
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.
|
|
685
582
|
|
|
686
|
-
##
|
|
583
|
+
## Limiter les fichiers lus et l'accès réseau
|
|
687
584
|
|
|
688
|
-
|
|
689
|
-
| --- | --- | --- | --- |
|
|
690
|
-
| Vérifier l'avancement | `/kimi:status` | `$kimi-status` | `/kimi-status` |
|
|
691
|
-
| Lire le résultat | `/kimi:result` | `$kimi-result` | `/kimi-result` |
|
|
692
|
-
| Annuler | `/kimi:cancel` | `$kimi-cancel` | `/kimi-cancel` |
|
|
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 :
|
|
693
586
|
|
|
694
|
-
|
|
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
|
|
695
589
|
|
|
696
|
-
|
|
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.
|
|
697
591
|
|
|
698
|
-
##
|
|
592
|
+
## Garder Kimi fonctionnel lors des mises à jour
|
|
699
593
|
|
|
700
|
-
|
|
594
|
+
Le plugin 3.1.0 applique une fenêtre de compatibilité glissante à partir de Kimi Code `2.8.0` :
|
|
701
595
|
|
|
702
|
-
|
|
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
|
|
703
600
|
|
|
704
|
-
|
|
705
|
-
codex plugin marketplace upgrade kimi-marketplace
|
|
706
|
-
codex plugin add kimi@kimi-marketplace
|
|
707
|
-
```
|
|
708
|
-
|
|
709
|
-
Pour supprimer le plugin, supprimez d'abord son hook : `/kimi:setup --uninstall` dans Claude Code, `$kimi-setup` dans Codex, ou `/kimi-setup --uninstall` dans DSH. Cela laisse en place les hooks des autres hôtes.
|
|
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`.
|
|
710
602
|
|
|
711
|
-
|
|
603
|
+
## Partager un répertoire de données et un hook de sécurité
|
|
712
604
|
|
|
713
|
-
|
|
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`.
|
|
714
606
|
|
|
715
|
-
|
|
607
|
+
Exécuter `setup` une seule fois publie le hook empaqueté et écrit un bloc unique `# === BEGIN kimi-plugin-cc-managed (v3.1.1) ===` 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`.
|
|
716
608
|
|
|
717
|
-
|
|
609
|
+
## Gérer les sessions, les modèles et les tâches
|
|
718
610
|
|
|
719
|
-
|
|
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.
|
|
720
612
|
|
|
721
|
-
|
|
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.
|
|
722
614
|
|
|
723
|
-
|
|
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.
|
|
724
616
|
|
|
725
|
-
|
|
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).
|
|
726
618
|
|
|
727
|
-
|
|
619
|
+
## Comprendre les limites de sécurité
|
|
728
620
|
|
|
729
|
-
|
|
730
|
-
- les tâches en écriture ne peuvent modifier que les fichiers situés dans votre espace de travail, et ne peuvent pas modifier l'état Git
|
|
731
|
-
- un swarm en écriture travaille dans un arbre de travail Git temporaire créé à partir de votre dernier commit et renvoie un patch. Il ne l'applique pas
|
|
621
|
+
Un seul hook de sécurité PreToolUse vérifie chaque appel d'outil de Kimi :
|
|
732
622
|
|
|
733
|
-
|
|
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é
|
|
734
626
|
|
|
735
|
-
|
|
736
|
-
- voir où mène une adresse web : une adresse publique peut rediriger vers une adresse privée
|
|
737
|
-
- agir comme un bac à sable : les tâches en écriture peuvent exécuter des tests et des commandes similaires, qui exécutent du code issu de votre dépôt
|
|
738
|
-
- créer de commit. Relisez les modifications avant de les conserver
|
|
627
|
+
Le plugin ne fait pas ce qui suit :
|
|
739
628
|
|
|
740
|
-
|
|
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
|
|
741
633
|
|
|
742
|
-
|
|
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).
|
|
743
635
|
|
|
744
|
-
##
|
|
636
|
+
## Signaler un problème et contribuer
|
|
745
637
|
|
|
746
|
-
Signalez
|
|
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).
|
|
747
639
|
|
|
748
640
|
</details>
|
|
749
641
|
|
|
750
642
|
<details>
|
|
751
|
-
<summary
|
|
643
|
+
<summary>日本語:はじめに</summary>
|
|
752
644
|
|
|
753
|
-
## コーディングタスクでKimiを使う
|
|
645
|
+
## コーディングタスクで Kimi を使う
|
|
754
646
|
|
|
755
|
-
Claude Code、Codex
|
|
647
|
+
質問、コードレビュー、設計への批評、ワークスペース内の修正、複数ステップのゴール、並列スウォームをローカルの Kimi Code CLI に送信できます。Claude Code、Codex、Antigravity、DeepSeek Harness(DSH)、または Magpie から Kimi を呼び出せます。
|
|
756
648
|
|
|
757
|
-
|
|
649
|
+
プラグインはご自身の Kimi サブスクリプションまたは API キーを使ってローカルで Kimi を実行し、ホスト側のログイン状態を変更しません。Kimi のプロバイダーには、各タスクが読み取ったプロンプトとコードだけが送信されます。
|
|
758
650
|
|
|
759
|
-
|
|
651
|
+
読み取り専用タスクは、ファイルの編集もシェルコマンドの実行もできません。書き込みタスクは、ワークスペース内または一時的な Git ワークツリー内のファイルだけを編集し、Git の履歴は一切変更しません。
|
|
760
652
|
|
|
761
|
-
##
|
|
653
|
+
## インストール前の準備
|
|
762
654
|
|
|
763
|
-
|
|
655
|
+
次の環境が必要です:
|
|
764
656
|
|
|
765
|
-
- macOSまたはLinux
|
|
766
|
-
-
|
|
767
|
-
- Node.js 22.5以降(DSH
|
|
768
|
-
-
|
|
657
|
+
- macOS または Linux
|
|
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 操作を認定しており、それより古いバージョンを拒否します)
|
|
769
661
|
|
|
770
|
-
Windows
|
|
662
|
+
Windows ではモデル実行をサポートしていません。コントリビューターは [Windows 診断チェック](./docs/ci.md#windows-spawn-controls) を実行できます。
|
|
771
663
|
|
|
772
|
-
|
|
664
|
+
[Kimi Code はじめにガイド](https://www.kimi.com/code/docs/en/kimi-code-cli/getting-started) に従って Kimi Code をインストールするか、`kimi_setup` を使って認定済みの `2.8.0` バイナリをインストールしてください。Bun やビルド手順は不要です。
|
|
773
665
|
|
|
774
|
-
|
|
666
|
+
ターミナルで `kimi` を実行し、サブスクリプションなら `/login`、API キーなら `/provider` で認証してください。認証情報は必ず Kimi 内で入力し、アシスタントのチャットには入力しないでください。`KIMI_CODE_HOME` を設定する場合は、Kimi とこのプラグインで同じディレクトリを使ってください。
|
|
775
667
|
|
|
776
|
-
## Claude Code
|
|
668
|
+
## Claude Code へのインストール
|
|
777
669
|
|
|
778
|
-
|
|
670
|
+
プロジェクト内の Claude Code で次のコマンドを実行します:
|
|
779
671
|
|
|
780
672
|
```text
|
|
781
673
|
/plugin marketplace add linxule/kimi-plugin-cc
|
|
782
674
|
/plugin install kimi@kimi-marketplace
|
|
783
|
-
/kimi:setup
|
|
784
|
-
/kimi:setup --check
|
|
785
675
|
```
|
|
786
676
|
|
|
787
|
-
|
|
677
|
+
Claude Code は `.mcp.json` から `kimi` MCP サーバーを、`skills/kimi/SKILL.md` からスキルを自動的に読み込みます。Claude に安全フックのインストールと確認を依頼してください:
|
|
788
678
|
|
|
789
679
|
```text
|
|
790
|
-
|
|
680
|
+
Run kimi_setup with action "install", then action "check".
|
|
791
681
|
```
|
|
792
682
|
|
|
793
|
-
|
|
683
|
+
`Probe:` の行に `ok` と表示されることを確認してから、読み取り専用の質問を試してください:
|
|
794
684
|
|
|
795
|
-
|
|
685
|
+
```text
|
|
686
|
+
Use Kimi to explain how this project's main entry point works.
|
|
687
|
+
```
|
|
688
|
+
|
|
689
|
+
## Codex へのインストール
|
|
690
|
+
|
|
691
|
+
ターミナルで次のコマンドを実行します:
|
|
796
692
|
|
|
797
693
|
```sh
|
|
798
694
|
codex plugin marketplace add linxule/kimi-plugin-cc
|
|
799
695
|
codex plugin add kimi@kimi-marketplace
|
|
800
696
|
```
|
|
801
697
|
|
|
802
|
-
プロジェクトで新しいCodex
|
|
803
|
-
|
|
804
|
-
```text
|
|
805
|
-
Use $kimi-setup to install the safety hook, then check readiness.
|
|
806
|
-
```
|
|
807
|
-
|
|
808
|
-
`Probe:`の行に`ok`と表示されるはずです。次に、以下を試してください。
|
|
698
|
+
プロジェクトで新しい Codex タスクを開き、次のプロンプトを送信します:
|
|
809
699
|
|
|
810
700
|
```text
|
|
811
|
-
Use $kimi
|
|
701
|
+
Use $kimi to run kimi_setup (install, then check), then explain how this project's main entry point works.
|
|
812
702
|
```
|
|
813
703
|
|
|
814
|
-
##
|
|
704
|
+
## Antigravity へのインストール
|
|
815
705
|
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
このリポジトリをチェックアウトしたディレクトリから、以下を実行します。
|
|
706
|
+
リポジトリのルートディレクトリを Antigravity のプラグインディレクトリにシンボリックリンクまたはコピーします。ルートには `plugin.json`、`mcp_config.json`、`assets/logo.svg`、`skills/kimi/SKILL.md` が含まれています:
|
|
819
707
|
|
|
820
708
|
```sh
|
|
821
|
-
|
|
709
|
+
ln -sfn /path/to/kimi-plugin-cc ~/.gemini/config/plugins/kimi
|
|
822
710
|
```
|
|
823
711
|
|
|
824
|
-
|
|
712
|
+
Antigravity を再起動するかプラグインを再読み込みしてから、`kimi_setup` を `action: "install"` と `action: "check"` で実行するよう依頼してください。
|
|
825
713
|
|
|
826
|
-
|
|
714
|
+
## DeepSeek Harness へのインストール
|
|
827
715
|
|
|
828
|
-
|
|
716
|
+
プラグインをインストールする前に、DSH のホストとプロファイルの依存関係を `zod >=4.6.6` と `undici >=8.12.2` に更新してください。最初に [パッチ適用済み DSH ホストとプロファイルの手順](./docs/safety.md#patched-dsh-host-and-profiles) を実行してください。
|
|
829
717
|
|
|
830
|
-
|
|
718
|
+
npm またはローカルのチェックアウトからルートパッケージをインストールします。DSH は `@deepseek-ai/dsh-mcp-client` と `@deepseek-ai/dsh-skill-filesystem` を使ってルートの `cordis.patch.yml` を直接読み込みます:
|
|
831
719
|
|
|
832
720
|
```sh
|
|
833
|
-
|
|
834
|
-
claude --plugin-dir ~/.local/share/kimi-plugin-cc/node_modules/kimi-plugin-cc
|
|
721
|
+
dsh plugin --profile web add kimi-plugin-cc
|
|
835
722
|
```
|
|
836
723
|
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
## エージェントからKimiを使う
|
|
840
|
-
|
|
841
|
-
このプラグインには、Claude CodeとCodex向けのMCPサーバーが含まれています。エージェントとして動作している場合は、長時間かかる作業にこれらのツールを優先して使ってください。接続が切れてもジョブは実行を継続し、MCPタスクに対応したクライアントには完了時に通知が届きます。それ以外のクライアントは確認用の`job_id`を受け取ります。
|
|
842
|
-
|
|
843
|
-
| ツール | 動作内容 | 書き込みできるか |
|
|
844
|
-
| --- | --- | --- |
|
|
845
|
-
| `kimi_ask` | リポジトリに関する質問に回答します | いいえ |
|
|
846
|
-
| `kimi_review` | 変更をレビューします。`mode: "challenge"`を指定すると、代わりにアプローチ自体を問い直します | いいえ |
|
|
847
|
-
| `kimi_rescue` | 調査を行うか、範囲を限定した修正を行います | ワークスペース内のファイルのみ。Gitは変更しません |
|
|
848
|
-
| `kimi_pursue` | 複数ターンにわたり目標に向けて作業します(実験的) | ワークスペース内のファイルのみ。Gitは変更しません |
|
|
849
|
-
| `kimi_swarm` | 独立した対象に対して読み取り専用の並列チェックを実行します | いいえ |
|
|
850
|
-
| `kimi_swarm_write` | 一時的なGitワークツリーで並列編集を実行します | パッチを返します。適用はしません |
|
|
851
|
-
|
|
852
|
-
ジョブの追跡や停止には、`kimi_job_status`、`kimi_job_result`、`kimi_job_cancel`を使用します。結果には`warnings`が含まれることがあります。その場合はユーザーに伝えてください。
|
|
853
|
-
|
|
854
|
-
`kimi_ask`、`kimi_review`、`kimi_swarm`は`read_roots`と`network`を受け付けます。[タスクの読み取り範囲とアクセス先を制限する](#タスクの読み取り範囲とアクセス先を制限する)を参照してください。
|
|
855
|
-
|
|
856
|
-
Codexのようにホストからデフォルトのプロジェクトディレクトリが渡されない場合は、`workspace`に絶対パスを渡してください。
|
|
857
|
-
|
|
858
|
-
## 自分でKimiを使う
|
|
859
|
-
|
|
860
|
-
| コマンド | 動作内容 |
|
|
861
|
-
| --- | --- |
|
|
862
|
-
| `/kimi:task` | 質問に回答します。`--write`を付けると、Kimiがワークスペース内のファイルを編集できるようになります |
|
|
863
|
-
| `/kimi:review` | 作業ツリーをレビューします。`--base <ref>`を付けるとブランチをレビューします。`--challenge`を付けるとアプローチ自体を問い直します |
|
|
864
|
-
| `/kimi:pursue` | 制限時間内で複数ターンにわたり目標に向けて作業します(実験的)。ワークスペース内のファイルを編集できます |
|
|
865
|
-
| `/kimi:swarm` | 読み取り専用の並列チェックを実行します。`--write`を付けると、並列編集をパッチとして作成します |
|
|
866
|
-
| `/kimi:setup` | フックのインストールや確認、モデルの一覧表示、Kimiのインストールを行います |
|
|
867
|
-
| `/kimi:status`、`/kimi:result`、`/kimi:cancel`、`/kimi:replay` | タスクの追跡、結果の読み取り、停止、リプレイを行います |
|
|
868
|
-
|
|
869
|
-
`--write`や`--challenge`は、プロンプトの前に指定してください。
|
|
870
|
-
|
|
871
|
-
バージョン3.0で一部のコマンドが統合されました。
|
|
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` を実行してください。
|
|
872
725
|
|
|
873
|
-
|
|
874
|
-
- `/kimi:rescue`は`/kimi:task --write`になりました
|
|
875
|
-
- `/kimi:challenge`は`/kimi:review --challenge`になりました
|
|
876
|
-
- MCPツールの`kimi_challenge`は、`mode: "challenge"`を指定した`kimi_review`になりました
|
|
726
|
+
## Magpie とその他の MCP クライアントへのインストール
|
|
877
727
|
|
|
878
|
-
|
|
728
|
+
Copilot、Cursor、Grok などのエージェント向けに、`scripts/companion.sh mcp` をローカル stdio MCP サーバーとして登録します:
|
|
879
729
|
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
730
|
+
```sh
|
|
731
|
+
magpie library mcp add kimi /path/to/kimi-plugin-cc/scripts/companion.sh mcp agents=copilot,cursor,grok --local
|
|
732
|
+
```
|
|
883
733
|
|
|
884
|
-
|
|
734
|
+
`claude`、`codex`、`antigravity`、`dsh` がすでに Kimi プラグインを直接読み込んでいる場合は、サーバー名の競合を防ぐため Magpie 側には追加しないでください。
|
|
885
735
|
|
|
886
|
-
`/kimi
|
|
736
|
+
その後、ターミナルで `/path/to/kimi-plugin-cc/scripts/companion.sh setup` と `setup --check` を 1 回実行するか、エージェントから `kimi_setup` を呼び出してください。
|
|
887
737
|
|
|
888
|
-
|
|
889
|
-
- `--network`は、ウェブ検索と公開ウェブページの取得を許可します。同時に、ファイルの読み取りをワークスペースと`--read-root`で指定したディレクトリに制限します
|
|
738
|
+
## npm からのインストール
|
|
890
739
|
|
|
891
|
-
|
|
740
|
+
専用のパッケージディレクトリに [npm から `kimi-plugin-cc`](https://www.npmjs.com/package/kimi-plugin-cc) をインストールすることもできます。共有ランタイムデータを保存する `~/.local/share/kimi-plugin-cc` とは別のディレクトリを指定してください:
|
|
892
741
|
|
|
893
|
-
|
|
742
|
+
```sh
|
|
743
|
+
npm install --prefix ~/.local/share/kimi-plugin-cc-pkg kimi-plugin-cc@3.1.1
|
|
744
|
+
claude --plugin-dir ~/.local/share/kimi-plugin-cc-pkg/node_modules/kimi-plugin-cc
|
|
745
|
+
```
|
|
894
746
|
|
|
895
|
-
|
|
747
|
+
同じホスト内で、有効なマーケットプレイス版と npm 版を同時に読み込まないでください。メンテナーは [npm 公開手順](./docs/ci.md#npm-oidc-publishing) を参照してください。
|
|
896
748
|
|
|
897
|
-
|
|
749
|
+
## MCP で Kimi を使う
|
|
898
750
|
|
|
899
|
-
-
|
|
900
|
-
- `/kimi:task --write`、`/kimi:pursue`、`/kimi:swarm`は`KIMI_CAPABILITY_NOT_CERTIFIED`を返して実行を拒否します
|
|
901
|
-
- `--network`は実行を拒否します
|
|
751
|
+
すべてのホストが同じ 4 つの MCP ツールと完全な `SEP-2640` スキル検出(`skill://kimi/SKILL.md` と `skill://kimi/agents/openai.yaml` に対する `skills/list`、`skills/get`、`resources/list`、`resources/read`)を共有します:
|
|
902
752
|
|
|
903
|
-
|
|
753
|
+
| ツール | モードまたはアクション | ファイル書き込み |
|
|
754
|
+
| --- | --- | --- |
|
|
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、またはセッションプレビューを更新 |
|
|
904
759
|
|
|
905
|
-
|
|
760
|
+
`kimi_read` と `kimi_write` に対する標準の `tools/call` リクエストは、既定で最大 50 秒待機し(`wait: true`)、回答を直接返します。`wait_timeout_ms` は最大 `86400000` ミリ秒(24 時間)まで延長できます。クライアントが切断または待機をキャンセルするとポーリングは止まりますが、Kimi ジョブ自体は継続します。
|
|
906
761
|
|
|
907
|
-
|
|
762
|
+
並列タスクを起動するときにすぐ `{ job_id }` を受け取るには、`wait: false` を指定してください。その後、`kimi_job` で各ジョブの確認、待機、停止を行えます。MCP `2026-07-28` タスク(`io.modelcontextprotocol/tasks`)に対応したクライアントは、`tasks/get` と `tasks/cancel` 用のネイティブタスクハンドルを受け取ります。
|
|
908
763
|
|
|
909
|
-
|
|
764
|
+
ホストが既定のプロジェクトディレクトリを設定しない場合は、絶対パスで `workspace` を渡してください。`Warnings:` ブロックが返された場合は、必ずユーザーにそのまま伝えてください。
|
|
910
765
|
|
|
911
|
-
|
|
766
|
+
## ターミナルから Kimi を使う
|
|
912
767
|
|
|
913
|
-
|
|
768
|
+
`scripts/companion.sh` から 5 つの主要 CLI サブコマンドを直接実行できます:
|
|
914
769
|
|
|
915
|
-
|
|
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 サーバーを起動 |
|
|
916
777
|
|
|
917
|
-
|
|
778
|
+
`--mode` などのフラグは `--` またはプロンプトの前に置いてください。`ask`、`review`、`task rescue`、`status`、`result`、`cancel` といった旧サブコマンドも互換エイリアスとしてそのまま使えます。
|
|
918
779
|
|
|
919
|
-
|
|
780
|
+
## 前のセッションを参照する
|
|
920
781
|
|
|
921
|
-
|
|
782
|
+
MCP の `referenced_sessions` または CLI の `--reference-session <id>` を使うと、1 から 8 個の過去のジョブ ID または Kimi セッション ID を渡せます。セッション参照は `ask`、`review`、`challenge`、`rescue`、`swarm`、`swarm_patch` で利用でき、`pursue` では使えません:
|
|
922
783
|
|
|
923
|
-
```
|
|
924
|
-
/
|
|
784
|
+
```sh
|
|
785
|
+
scripts/companion.sh read --reference-session <job-id> -- Continue the migration from where that session stopped.
|
|
925
786
|
```
|
|
926
787
|
|
|
927
|
-
|
|
788
|
+
Kimi は各セッションのメインログへのパスを受け取り、必要な箇所だけを読み取ります。`read_roots` または `network` を指定した場合、参照した各セッションの `agents/main` ディレクトリが読み取り許可ルートに追加されます。そのセッションログの内容がマシン外へ送信されても問題ない場合にのみ、`network` と組み合わせてください。
|
|
928
789
|
|
|
929
|
-
##
|
|
790
|
+
## 読み取り範囲とネットワークアクセスを制限する
|
|
930
791
|
|
|
931
|
-
|
|
932
|
-
| --- | --- | --- | --- |
|
|
933
|
-
| 進捗の確認 | `/kimi:status` | `$kimi-status` | `/kimi-status` |
|
|
934
|
-
| 結果の読み取り | `/kimi:result` | `$kimi-result` | `/kimi-result` |
|
|
935
|
-
| キャンセル | `/kimi:cancel` | `$kimi-cancel` | `/kimi-cancel` |
|
|
792
|
+
既定では、読み取り専用タスクはユーザーアカウントが読み取れる任意のファイルを読み取ることができ、ウェブにはアクセスできません。`kimi_read`(`ask`、`review`、`challenge`、`swarm`)および `companion.sh read` では、次の 2 つのオプションで範囲を制限できます:
|
|
936
793
|
|
|
937
|
-
|
|
794
|
+
- `read_roots` または `--read-root <abs-dir>`(複数指定可)は、`Read`、`Grep`、`Glob`、`ReadMediaFile` の読み取り対象をワークスペースと指定ディレクトリだけに制限する
|
|
795
|
+
- `network: true` または `--network` は、公開ホストへの `WebSearch` と `FetchURL` を許可し、4 つの読み取りツールをワークスペースと指定ディレクトリだけに制限する
|
|
938
796
|
|
|
939
|
-
|
|
797
|
+
書き込みタスクではこれら 2 つのオプションを指定できません。読み取り範囲とネットワーク制限はその 1 回の実行にのみ適用され、再開したターンには引き継がれません。
|
|
940
798
|
|
|
941
|
-
##
|
|
799
|
+
## Kimi 更新時も動作を維持する
|
|
942
800
|
|
|
943
|
-
|
|
801
|
+
プラグイン 3.1.0 は Kimi Code `2.8.0` 以降のローリング互換ウィンドウを採用しています:
|
|
944
802
|
|
|
945
|
-
|
|
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` 未満のリリースはすべての操作を拒否する
|
|
946
807
|
|
|
947
|
-
|
|
948
|
-
codex plugin marketplace upgrade kimi-marketplace
|
|
949
|
-
codex plugin add kimi@kimi-marketplace
|
|
950
|
-
```
|
|
951
|
-
|
|
952
|
-
プラグインを削除するには、まずフックを削除します。Claude Codeでは`/kimi:setup --uninstall`、Codexでは`$kimi-setup`、DSHでは`/kimi-setup --uninstall`を実行してください。他のホストのフックはそのまま残ります。
|
|
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` の順に選択します。
|
|
953
809
|
|
|
954
|
-
|
|
810
|
+
## 単一のデータディレクトリと安全フックを共有する
|
|
955
811
|
|
|
956
|
-
|
|
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` に保存されます。
|
|
957
813
|
|
|
958
|
-
|
|
814
|
+
`setup` を 1 回実行すると、バンドル済みフックが配置され、`~/.kimi-code/config.toml` に単一の `# === BEGIN kimi-plugin-cc-managed (v3.1.1) ===` ブロックが書き込まれます。バージョン 3.0 の古い `:<host-id>` ブロックも自動的に統合されます。同じ Node バイナリを使うホスト間では、`setup` の実行は 1 回だけで十分です。ホストごとに異なる Node パスが解決される場合は、`KIMI_PLUGIN_CC_NODE_BIN` で同じ Node バイナリを指定してください。
|
|
959
815
|
|
|
960
|
-
|
|
816
|
+
## セッション、モデル、ジョブを管理する
|
|
961
817
|
|
|
962
|
-
|
|
818
|
+
セッションは Kimi Code Desktop と `kimi web` に表示され、元のリクエスト文がプレビューになります。プレビューを修復するには、`kimi_setup({ action: "repair_sessions" })` または `scripts/companion.sh setup --repair-sessions [--apply] [--all]` を実行してください。詳しくは [セッションの表示とタイトル](./docs/session-visibility.md) を参照してください。
|
|
963
819
|
|
|
964
|
-
|
|
820
|
+
設定済みのモデルエイリアスをオフラインで一覧表示するには、`kimi_setup({ action: "models" })` または `scripts/companion.sh setup --models [--json]` を実行します。1 回の実行だけモデルを指定するには MCP の `model` または CLI の `-m` を渡し、既定のモデルを変更するには `kimi` 内で `/model` を実行してください。詳しくは [モデル選択](./docs/models.md) を参照してください。
|
|
965
821
|
|
|
966
|
-
|
|
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) を参照してください。
|
|
967
823
|
|
|
968
|
-
|
|
824
|
+
管理対象の安全フックを削除するには、`scripts/companion.sh setup --uninstall` を実行します。バージョン 3.0 からアップグレードする場合は、[3.0 から 3.1 へのアップグレード](./docs/migration.md#upgrading-from-30-to-31) を確認してください。
|
|
969
825
|
|
|
970
|
-
|
|
826
|
+
## 安全上の制限を理解する
|
|
971
827
|
|
|
972
|
-
|
|
973
|
-
- 書き込みを行うタスクは、ワークスペース内のファイルのみを変更でき、Gitの状態は変更できません
|
|
974
|
-
- 書き込みスウォームは、最新コミットから作成した一時的なGitワークツリーで作業し、パッチを返します。パッチの適用はしません
|
|
828
|
+
単一の PreToolUse 安全フックが Kimi のすべてのツール呼び出しを検査します:
|
|
975
829
|
|
|
976
|
-
|
|
830
|
+
- 読み取り専用タスクはファイルの編集とシェルコマンドを拒否する
|
|
831
|
+
- 書き込みタスクはワークスペース内のファイルだけを編集し、Git の状態を変更しない
|
|
832
|
+
- `swarm_patch` は `HEAD` から作成した一時的な Git ワークツリー内で編集し、未適用のパッチを返す
|
|
977
833
|
|
|
978
|
-
|
|
979
|
-
- ウェブアドレスの到達先を確認すること。公開アドレスがプライベートアドレスにリダイレクトされる可能性があります
|
|
980
|
-
- サンドボックスとして動作すること。書き込みを行うタスクはテストなどのコマンドを実行でき、それによってリポジトリ内のコードが実行されます
|
|
981
|
-
- コミットを行うこと。変更を残す前に内容を確認してください
|
|
834
|
+
このプラグインは次のことを行いません:
|
|
982
835
|
|
|
983
|
-
|
|
836
|
+
- `read_roots` または `network` を指定しない限り、ファイルの読み取り範囲を制限しない
|
|
837
|
+
- `FetchURL` が記述された URL を検証した後の DNS 解決や HTTP リダイレクトを検査しない
|
|
838
|
+
- 書き込みタスクが起動したリポジトリのテストランナーを OS レベルでサンドボックス化しない
|
|
839
|
+
- パッチの適用や Git コミットの作成を行わない
|
|
984
840
|
|
|
985
|
-
[
|
|
841
|
+
書き込みタスクは信頼できるリポジトリでのみ実行してください。拒否コードとリリース履歴については、[安全性と拒否コード](./docs/safety.md#native-v2-refusal-codes) と [変更履歴](./CHANGELOG.md) を参照してください。
|
|
986
842
|
|
|
987
|
-
##
|
|
843
|
+
## 問題の報告とコントリビュート
|
|
988
844
|
|
|
989
|
-
|
|
845
|
+
バグの報告や変更の提案は [GitHub issues](https://github.com/linxule/kimi-plugin-cc/issues) で受け付けています。コントリビューターは [ランタイム不変条件](./docs/invariants.md) と [継続的インテグレーションの詳細](./docs/ci.md) を参照してください。
|
|
990
846
|
|
|
991
847
|
</details>
|
|
992
848
|
|
|
993
849
|
---
|
|
994
850
|
|
|
995
|
-
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).
|