@kyo-so/cli 0.8.0 → 0.9.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/.agents/skills/kyoso-review/SKILL.md +8 -5
- package/.agents/skills/kyoso-review/agents/openai.yaml +0 -7
- package/CHANGELOG.md +71 -0
- package/README.ja.md +106 -13
- package/README.md +106 -13
- package/README.zh-CN.md +106 -13
- package/dist/audit/safeTraceFile.d.ts +20 -0
- package/dist/audit/stateRoot.d.ts +38 -0
- package/dist/audit/trace.d.ts +15 -3
- package/dist/bin/kyoso.js +3788 -1330
- package/dist/cli/codexPluginDetector.d.ts +70 -0
- package/dist/cli/doctor.d.ts +3 -0
- package/dist/cli/integration.d.ts +30 -0
- package/dist/cli/knownSkillDigests.d.ts +11 -0
- package/dist/cli/pluginRuntimeContract.d.ts +232 -0
- package/dist/cli/setup.d.ts +24 -4
- package/dist/cli/skillInstall.d.ts +16 -0
- package/dist/core/constants.d.ts +1 -1
- package/dist/core/runReview.d.ts +2 -0
- package/dist/index.js +629 -117
- package/dist/utils/pathContainment.d.ts +1 -0
- package/package.json +11 -4
|
@@ -34,11 +34,14 @@ Do not use this skill for every coding task. It is intended for deliberate revie
|
|
|
34
34
|
- `plan_review`
|
|
35
35
|
- `security_review`
|
|
36
36
|
- `diff_review`
|
|
37
|
-
- If the MCP tools are unavailable, use the CLI
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
-
|
|
37
|
+
- If the MCP tools are unavailable, use the first available CLI path with JSON output:
|
|
38
|
+
1. An installed `kyoso` executable on `PATH`.
|
|
39
|
+
2. `npx -y @kyo-so/cli`.
|
|
40
|
+
3. `bunx @kyo-so/cli`.
|
|
41
|
+
- Append the review command to the selected CLI path:
|
|
42
|
+
- `plan_review` -> `plan --goal <text> [--plan <path-or-text>] [--file <path>] --json`
|
|
43
|
+
- `security_review` -> `security --goal <text> [--diff <path>] [--file <path>] --json`
|
|
44
|
+
- `diff_review` -> `diff --base <ref> --head <ref> --json`
|
|
42
45
|
- The CLI also accepts `--repo-summary`, repeatable `--constraint`, and repeatable `--file` flags. For a large review, adjust an agent timeout with `--set agents.<agent>.timeoutMs=<ms>`.
|
|
43
46
|
- Run the CLI without a config trust flag first. Inspect `audit.warnings` in the JSON result; if it contains `untrusted config was not executed`, or the command fails with an untrusted-config message, ask the user whether to rerun with `--trust-config` to use it or `--ignore-config` to skip it. Never add `--trust-config` without confirmation.
|
|
44
47
|
- Keep `--json` enabled and interpret the returned `decision` exactly like the MCP result.
|
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,77 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.9.1] - 2026-07-13
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Claude Code Marketplace Plugin distribution with a shared Kyoso Skill and
|
|
15
|
+
version-pinned local stdio MCP server.
|
|
16
|
+
- Best-effort post-publish reminders when either Plugin CLI pin lags the
|
|
17
|
+
released CLI version.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- Move the Codex Plugin MCP definition to
|
|
22
|
+
`plugins/kyoso/.codex-plugin/mcp.json` so it cannot be auto-discovered by
|
|
23
|
+
Claude Code as a Plugin-root `.mcp.json`.
|
|
24
|
+
- Document opt-in per-tool approval settings for avoiding Kyoso rejections in
|
|
25
|
+
Codex Auto mode, including the risk of sending selected code and review
|
|
26
|
+
context to configured external model providers. The Plugin keeps approvals
|
|
27
|
+
disabled by default.
|
|
28
|
+
- Update the default `@agentclientprotocol/claude-agent-acp` adapter from
|
|
29
|
+
`0.57.0` to `0.58.1` for resumed-session model preservation, cancelled-turn
|
|
30
|
+
usage reporting, and streamed-thinking robustness.
|
|
31
|
+
- Update `@modelcontextprotocol/server` from `2.0.0-beta.2` to
|
|
32
|
+
`2.0.0-beta.3`, restoring legacy `CallToolResult` parsing tolerance and
|
|
33
|
+
incorporating transport and authentication validation fixes.
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
|
|
37
|
+
- Updated the pinned Codex ACP adapter to `1.1.2`, whose bundled Codex model
|
|
38
|
+
catalog advertises reasoning-effort options for `gpt-5.6` family models.
|
|
39
|
+
|
|
40
|
+
## [0.9.0] - 2026-07-11
|
|
41
|
+
|
|
42
|
+
### Added
|
|
43
|
+
|
|
44
|
+
- Codex Marketplace fixture with a version-pinned local stdio MCP, bundled
|
|
45
|
+
`kyoso-review` Skill, isolated runtime probe, and compatibility records for
|
|
46
|
+
Codex CLI 0.144.0-alpha.4 and 0.144.1.
|
|
47
|
+
- `kyoso setup codex|claude-code --skill-only` for installing the canonical
|
|
48
|
+
Skill without reading or writing MCP configuration. The setup surface also
|
|
49
|
+
supports `--force` for Skill-only replacement and rejects MCP-only option
|
|
50
|
+
combinations.
|
|
51
|
+
- Managed Skill updates with deterministic directory digests,
|
|
52
|
+
`.kyoso-install.json`, published 0.8.0 legacy adoption, user-change conflict
|
|
53
|
+
detection, symlink rejection, and staged backup/rename replacement.
|
|
54
|
+
|
|
55
|
+
### Changed
|
|
56
|
+
|
|
57
|
+
- Recover interrupted managed-Skill replacements from a fixed backup, fail
|
|
58
|
+
closed on ambiguous recovery state, and guard rename operations against
|
|
59
|
+
parent-directory replacement.
|
|
60
|
+
- Audit traces now use a verified POSIX user state root (`$XDG_STATE_HOME` or
|
|
61
|
+
`$HOME/.local/state`) instead of a workspace-controlled `.kyoso/traces`
|
|
62
|
+
path. The new layout hashes the workspace realpath; existing workspace
|
|
63
|
+
traces are not migrated or deleted automatically.
|
|
64
|
+
- The canonical bundled Skill continues to try Kyoso MCP tools, an installed
|
|
65
|
+
`kyoso` on `PATH`, `npx`, then `bunx`, without declaring MCP as a required
|
|
66
|
+
dependency. The generated Marketplace Plugin copy declares its bundled
|
|
67
|
+
`kyoso` MCP server as a dependency; a disabled Plugin MCP must be re-enabled
|
|
68
|
+
or migrated to CLI plus Skill-only rather than falling back to the CLI.
|
|
69
|
+
- Codex MCP configuration resolves from `CODEX_HOME`, while global Codex Skill
|
|
70
|
+
installation continues to resolve from `HOME`.
|
|
71
|
+
|
|
72
|
+
### Fixed
|
|
73
|
+
|
|
74
|
+
- Harden Audit trace creation against workspace-controlled symlinks and races
|
|
75
|
+
with verified handles, exclusive creation, and fail-closed state-root
|
|
76
|
+
containment. Windows and runtimes without proven safe filesystem
|
|
77
|
+
capabilities disable Audit writing rather than using an insecure fallback;
|
|
78
|
+
Windows support will be re-enabled only after equivalent ownership, symlink,
|
|
79
|
+
and file-identity guarantees are implemented and verified.
|
|
80
|
+
|
|
10
81
|
## [0.8.0] - 2026-07-10
|
|
11
82
|
|
|
12
83
|
### Added
|
package/README.ja.md
CHANGED
|
@@ -36,6 +36,45 @@ backend が 1 つだけ有効な場合は、2 role の ensemble の代わりに
|
|
|
36
36
|
|
|
37
37
|
グローバルインストールは不要です。Kyoso は `npx` または `bunx` で実行します。
|
|
38
38
|
|
|
39
|
+
### 導入モード
|
|
40
|
+
|
|
41
|
+
| モード | 導入物 | MCP | 対象 |
|
|
42
|
+
| ------------------ | ------------------------ | ---: | ------------------ |
|
|
43
|
+
| Marketplace Plugin | Skill+ローカルstdio MCP | あり | Codex/Claude Code |
|
|
44
|
+
| CLI+Skill-only | npm CLI+Skill | なし | Codex/Claude Code |
|
|
45
|
+
| 手動setup | 手動MCP登録+Skill | あり | Codex/Claude Code |
|
|
46
|
+
|
|
47
|
+
迷ったらMarketplace Pluginを選んでください。2コマンドでSkillとMCP serverをまとめて導入できます。手順は下の[Codex](#codex)/[Claude Code](#claude-code)節を参照してください。
|
|
48
|
+
|
|
49
|
+
#### Marketplace Plugin
|
|
50
|
+
|
|
51
|
+
PluginはSkillと公開済みのKyoso CLIの完全一致versionへpinしたMCP定義を同梱しますが、CLI本体は同梱しません。MCPの初回起動ではnpmへのnetwork accessが必要です。cache済みpackageでoffline起動できる場合はありますが、保証しません。manifestの`Read` capabilityは表示metadataであり、filesystem認可を追加するものではありません。
|
|
52
|
+
|
|
53
|
+
PluginのSkillは同梱の`kyoso` MCP serverをdependencyとして宣言するため、Kyoso reviewの明示的な実行はCLI fallbackではなくMCPへ誘導されます。同梱Plugin MCPを無効化した場合は、Plugin Skillを利用不可として扱います。MCPを再有効化するか、Pluginを削除してCLI+Skill-onlyへ移行してください。PluginはCLI fallback modeではありません。
|
|
54
|
+
|
|
55
|
+
#### CLI+Skill-only
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
# Global CLI+Codex Skill
|
|
59
|
+
npm install -g @kyo-so/cli
|
|
60
|
+
kyoso setup codex --write --skill-only --global
|
|
61
|
+
|
|
62
|
+
# Project CLI+Codex Skill
|
|
63
|
+
npm install -D @kyo-so/cli
|
|
64
|
+
npx kyoso setup codex --write --skill-only
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Claude Codeでは`codex`を`claude-code`へ置き換えます。既定はdry-runです。`--skill-only`はMCP設定を読み書きせず、`--runner`/`--command`とは併用できません。
|
|
68
|
+
|
|
69
|
+
Skill-onlyは意図的にMCP dependencyを宣言しません。`npx`または`bunx`のpackage-runner fallbackに到達すると、Codex Auto modeはsandbox network escalation approvalを要求することがあります。PATH上に`kyoso`を導入すると、このfallbackを避けられます。
|
|
70
|
+
|
|
71
|
+
#### 移行
|
|
72
|
+
|
|
73
|
+
- 手動MCPからCLI+Skill: CLIとSkillを先に導入し、`codex mcp remove kyoso`または`claude mcp remove kyoso --scope local|project|user`を実行します。
|
|
74
|
+
- CLI+SkillからPlugin: Pluginを追加してenabledを確認してから、手動MCP登録を削除します。手動コピーSkillは自動削除しません。
|
|
75
|
+
- PluginからCLI+Skill: CLIとSkillを先に導入し、`codex plugin remove kyoso@kyoso`を実行します。
|
|
76
|
+
- CLI+Skillから手動MCPへ戻す: `kyoso setup codex --write`または`kyoso setup claude-code --write`を実行します。
|
|
77
|
+
|
|
39
78
|
### Claude Only / Codex Only
|
|
40
79
|
|
|
41
80
|
Kyoso は Claude だけ、または Codex だけでも実行できます。利用できない backend は `kyoso.toml` で無効化してください。例は `examples/claude-only.toml` と `examples/codex-only.toml` にあります。
|
|
@@ -54,21 +93,32 @@ claude setup-token
|
|
|
54
93
|
|
|
55
94
|
このコマンドで得た `CLAUDE_CODE_OAUTH_TOKEN` を設定するか、直接 API 課金を使う場合は `ANTHROPIC_API_KEY` を設定します。
|
|
56
95
|
|
|
57
|
-
2.
|
|
96
|
+
2. Marketplace Plugin を導入します(推奨)。
|
|
97
|
+
|
|
98
|
+
```text
|
|
99
|
+
/plugin marketplace add hokupod/kyoso
|
|
100
|
+
/plugin install kyoso@kyoso
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Plugin は Kyoso review Skill と、公開済み CLI version に pin したローカル stdio MCP server を導入します。Plugin で導入した場合、`kyoso setup claude-code` は不要です。
|
|
104
|
+
|
|
105
|
+
3. または、MCP を登録して review skill をインストールします。
|
|
58
106
|
|
|
59
107
|
```bash
|
|
60
108
|
npx @kyo-so/cli setup claude-code --write
|
|
61
109
|
bunx @kyo-so/cli setup claude-code --write
|
|
62
110
|
```
|
|
63
111
|
|
|
64
|
-
|
|
112
|
+
手動で MCP を登録する場合は、`examples/claude-code-mcp.json` を使用します。
|
|
113
|
+
|
|
114
|
+
4. セットアップを確認します。
|
|
65
115
|
|
|
66
116
|
```bash
|
|
67
117
|
npx @kyo-so/cli doctor
|
|
68
118
|
bunx @kyo-so/cli doctor
|
|
69
119
|
```
|
|
70
120
|
|
|
71
|
-
|
|
121
|
+
5. Claude Code からレビューを依頼します。
|
|
72
122
|
|
|
73
123
|
```text
|
|
74
124
|
Use Kyoso plan_review on this plan before implementation.
|
|
@@ -82,21 +132,56 @@ Use Kyoso plan_review on this plan before implementation.
|
|
|
82
132
|
codex login
|
|
83
133
|
```
|
|
84
134
|
|
|
85
|
-
2.
|
|
135
|
+
2. Marketplace Plugin を導入します(推奨)。
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
codex plugin marketplace add hokupod/kyoso
|
|
139
|
+
codex plugin add kyoso@kyoso
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Codex desktopのPlugins pageまたは`/plugins`からKyosoを選ぶこともできます。追加したMarketplaceが見えない場合はdesktop appをrefresh/restartしてください。確認は`codex plugin list --marketplace kyoso --json`、削除は`codex plugin remove kyoso@kyoso`です。Plugin で導入した場合、`kyoso setup codex` は不要です。
|
|
143
|
+
|
|
144
|
+
Codex Auto modeでは、approvalが必要なKyoso toolの呼び出しが拒否されることがあります。個人設定で事前承認するには、次を`~/.codex/config.toml`(`CODEX_HOME`を設定している場合は`$CODEX_HOME/config.toml`)へ追加します。**Kyosoを信頼し、選択したコードとレビュー用contextが設定済みの外部model providerへ送信されることを許容できる場合だけ設定してください。** Pluginの既定値では有効にしていません。
|
|
145
|
+
|
|
146
|
+
```toml
|
|
147
|
+
[plugins."kyoso@kyoso".mcp_servers.kyoso.tools.diff_review]
|
|
148
|
+
approval_mode = "approve"
|
|
149
|
+
|
|
150
|
+
[plugins."kyoso@kyoso".mcp_servers.kyoso.tools.plan_review]
|
|
151
|
+
approval_mode = "approve"
|
|
152
|
+
|
|
153
|
+
[plugins."kyoso@kyoso".mcp_servers.kyoso.tools.security_review]
|
|
154
|
+
approval_mode = "approve"
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Pluginではなく、MCP serverとして直接登録している場合(`kyoso setup codex --write` または手動設定)は、`plugins."kyoso@kyoso".` プレフィックスなしの `mcp_servers.kyoso` キーを使用します。
|
|
158
|
+
|
|
159
|
+
```toml
|
|
160
|
+
[mcp_servers.kyoso.tools.diff_review]
|
|
161
|
+
approval_mode = "approve"
|
|
162
|
+
|
|
163
|
+
[mcp_servers.kyoso.tools.plan_review]
|
|
164
|
+
approval_mode = "approve"
|
|
165
|
+
|
|
166
|
+
[mcp_servers.kyoso.tools.security_review]
|
|
167
|
+
approval_mode = "approve"
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
3. または、MCP を登録して review skill をインストールします。
|
|
86
171
|
|
|
87
172
|
```bash
|
|
88
173
|
npx @kyo-so/cli setup codex --write
|
|
89
174
|
bunx @kyo-so/cli setup codex --write
|
|
90
175
|
```
|
|
91
176
|
|
|
92
|
-
|
|
177
|
+
4. セットアップを確認します。
|
|
93
178
|
|
|
94
179
|
```bash
|
|
95
180
|
npx @kyo-so/cli doctor
|
|
96
181
|
bunx @kyo-so/cli doctor
|
|
97
182
|
```
|
|
98
183
|
|
|
99
|
-
|
|
184
|
+
5. Codex からレビューを依頼します。
|
|
100
185
|
|
|
101
186
|
```text
|
|
102
187
|
Use Kyoso diff_review on the current diff. I need a second opinion before merging.
|
|
@@ -141,6 +226,8 @@ kyoso doctor
|
|
|
141
226
|
kyoso init
|
|
142
227
|
kyoso setup codex
|
|
143
228
|
kyoso setup claude-code
|
|
229
|
+
kyoso setup codex --write --skill-only
|
|
230
|
+
kyoso setup claude-code --write --skill-only
|
|
144
231
|
```
|
|
145
232
|
|
|
146
233
|
## Usage Examples
|
|
@@ -203,11 +290,13 @@ MCP stdout は protocol messages 専用です。logs は stderr または local
|
|
|
203
290
|
|
|
204
291
|
同梱の `kyoso-review` skill は意図的に狭い用途にしています。Kyoso、multi-agent review、plan review、security review、CISA Secure by Design review、diff review を明示的に依頼したときだけ trigger されるべきです。
|
|
205
292
|
|
|
206
|
-
|
|
293
|
+
Skillは利用可能な最初の経路を使います。順序はKyoso MCP tools、PATH上のインストール済み`kyoso`、`npx -y @kyo-so/cli`、`bunx @kyo-so/cli`です。package runner fallbackはnetwork accessが必要になり、version driftも起こり得るため、MCPなしの通常経路にはインストール済みCLIを使います。
|
|
294
|
+
|
|
295
|
+
`kyoso setup codex --write --skill-only`はcanonical Skill directoryを既定で`.agents/skills/kyoso-review/`へコピーします。`--global`を追加すると`~/.agents/skills/kyoso-review/`へコピーします。
|
|
207
296
|
|
|
208
|
-
`
|
|
297
|
+
`kyoso setup claude-code --write --skill-only`は既定で`.claude/skills/kyoso-review/`へコピーします。`--global`を追加すると`~/.claude/skills/kyoso-review/`へコピーします。
|
|
209
298
|
|
|
210
|
-
|
|
299
|
+
managed installはcanonical directoryのdigestとCLI versionを`.kyoso-install.json`へ記録します。現行または既知historical copyはadoptして自動更新します。変更済み/未知のcopyはconflictとして残し、上書きしません。`--force`はそのSkill directoryだけを置換し、MCP設定を削除・上書きしません。
|
|
211
300
|
|
|
212
301
|
## Safety Model
|
|
213
302
|
|
|
@@ -221,6 +310,10 @@ Repository content、plans、diffs、selected files は backend prompts 内で u
|
|
|
221
310
|
|
|
222
311
|
Finding title は aggregation のため簡潔な英語に正規化されます。evidence、recommendations、summaries はユーザーの言語のままで構いません。
|
|
223
312
|
|
|
313
|
+
Audit trace は workspace が制御するpathではなく、trusted user state root 配下へ書き込みます。対応するPOSIX runtimeでは、absoluteな`$XDG_STATE_HOME`が利用可能ならそれを、そうでなければ`$HOME/.local/state`を使用し、owner、permission、containment、symlinkを確認できた場合だけ書き込みます。検証またはsafe openに失敗した場合、別locationへ黙ってfallbackせず、そのreviewのAudit writeを無効化してsanitized warningを返し、review自体は継続します。
|
|
314
|
+
|
|
315
|
+
Windows、および必要なfilesystem capabilityを証明できない環境では、Audit writeをfail-closeで無効化します。trusted state rootを変更できる、または検証済みinodeをrenameできるsame OS user権限のhostile processはこの保証の対象外です。この脅威にはOS sandboxまたはnative dirfd-based supportが必要です。
|
|
316
|
+
|
|
224
317
|
## Agent Auth
|
|
225
318
|
|
|
226
319
|
Codex は利用可能な場合、local `codex` login を使用します。既定の subscription-backed path では API key は不要です。
|
|
@@ -266,15 +359,15 @@ effort は仕組みが異なります。Kyoso は env var を設定せず、sess
|
|
|
266
359
|
|
|
267
360
|
## Audit
|
|
268
361
|
|
|
269
|
-
Audit traces
|
|
362
|
+
対応するPOSIX runtimeでは、Audit traces はuser state base(absoluteな`$XDG_STATE_HOME`、なければ`$HOME/.local/state`)配下の次の場所に書き込まれます。
|
|
270
363
|
|
|
271
364
|
```text
|
|
272
|
-
|
|
365
|
+
<state-base>/kyoso/workspaces/<sha256(realpath(cwd))>/<logical audit.directory>/<yyyy-mm-dd>/<traceId>.jsonl
|
|
273
366
|
```
|
|
274
367
|
|
|
275
|
-
|
|
368
|
+
`audit.directory`はlogicalなrelative directory(既定: `.kyoso/traces`)であり、workspace内のdirectoryではありません。既存のworkspace `.kyoso/traces`は自動で移行・削除されません。
|
|
276
369
|
|
|
277
|
-
|
|
370
|
+
Raw agent output と raw file contents は既定で無効です。`audit.includeRawAgentOutput`を有効にすると、traces に sensitive review output が残る場合があります。local retention policy に従って古い traces を削除してください。Windowsまたは安全なfilesystem capabilityを証明できない環境では、Audit trace writeは無効のままで、reviewはsanitized warningを返します。
|
|
278
371
|
|
|
279
372
|
## Config
|
|
280
373
|
|
package/README.md
CHANGED
|
@@ -34,6 +34,45 @@ With a single backend enabled, one agent runs as `combined_reviewer` instead of
|
|
|
34
34
|
|
|
35
35
|
No global install is required. Run Kyoso through `npx` or `bunx`.
|
|
36
36
|
|
|
37
|
+
### Integration modes
|
|
38
|
+
|
|
39
|
+
| Mode | Installs | MCP | Clients |
|
|
40
|
+
| ------------------- | ---------------------------------- | --: | ------------------- |
|
|
41
|
+
| Marketplace Plugin | Skill plus local stdio MCP | Yes | Codex / Claude Code |
|
|
42
|
+
| CLI plus Skill-only | npm CLI plus Skill | No | Codex / Claude Code |
|
|
43
|
+
| Manual setup | Manual MCP registration plus Skill | Yes | Codex / Claude Code |
|
|
44
|
+
|
|
45
|
+
When in doubt, pick the Marketplace Plugin: two commands install the Skill and the MCP server together. Follow the [Codex](#codex) or [Claude Code](#claude-code) steps below.
|
|
46
|
+
|
|
47
|
+
#### Marketplace Plugin
|
|
48
|
+
|
|
49
|
+
The Plugin bundles the Skill and an MCP definition pinned to an exact published Kyoso CLI version; it does not bundle the CLI itself. Its first MCP start needs network access to npm. A cached package may work offline, but offline startup is not guaranteed. The manifest's `Read` capability is display metadata, not additional filesystem authorization.
|
|
50
|
+
|
|
51
|
+
The Plugin Skill declares the bundled `kyoso` MCP server as a dependency, so explicit Kyoso reviews are directed through MCP rather than a CLI fallback. If you disable the bundled Plugin MCP, treat the Plugin Skill as unavailable: re-enable it, or remove the Plugin and install CLI plus Skill-only instead. The Plugin is not a CLI-fallback mode.
|
|
52
|
+
|
|
53
|
+
#### CLI plus Skill-only
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# Global CLI and Codex Skill
|
|
57
|
+
npm install -g @kyo-so/cli
|
|
58
|
+
kyoso setup codex --write --skill-only --global
|
|
59
|
+
|
|
60
|
+
# Project CLI and Codex Skill
|
|
61
|
+
npm install -D @kyo-so/cli
|
|
62
|
+
npx kyoso setup codex --write --skill-only
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Replace `codex` with `claude-code` for Claude Code. Dry-run remains the default. `--skill-only` never reads or writes MCP configuration and cannot be combined with `--runner` or `--command`.
|
|
66
|
+
|
|
67
|
+
Skill-only intentionally does not declare an MCP dependency. When it reaches an `npx` or `bunx` package-runner fallback, Codex Auto mode can request a sandbox network escalation approval; installing `kyoso` on `PATH` avoids that fallback.
|
|
68
|
+
|
|
69
|
+
#### Migration
|
|
70
|
+
|
|
71
|
+
- Manual MCP to CLI plus Skill: install the CLI and Skill first, then run `codex mcp remove kyoso` or `claude mcp remove kyoso --scope local|project|user`.
|
|
72
|
+
- CLI plus Skill to Plugin: add the Plugin, confirm it is enabled, then remove the manual MCP registration. Manually copied Skills are not removed automatically.
|
|
73
|
+
- Plugin to CLI plus Skill: install the CLI and Skill first, then run `codex plugin remove kyoso@kyoso`.
|
|
74
|
+
- CLI plus Skill back to manual MCP: run `kyoso setup codex --write` or `kyoso setup claude-code --write`.
|
|
75
|
+
|
|
37
76
|
### Claude Only / Codex Only
|
|
38
77
|
|
|
39
78
|
Kyoso can run when only Claude or only Codex is available. Disable the missing backend in `kyoso.toml` using `examples/claude-only.toml` or `examples/codex-only.toml`.
|
|
@@ -52,21 +91,32 @@ claude setup-token
|
|
|
52
91
|
|
|
53
92
|
Set `CLAUDE_CODE_OAUTH_TOKEN` from that command, or set `ANTHROPIC_API_KEY` for direct API billing.
|
|
54
93
|
|
|
55
|
-
2.
|
|
94
|
+
2. Install the Marketplace Plugin (recommended).
|
|
95
|
+
|
|
96
|
+
```text
|
|
97
|
+
/plugin marketplace add hokupod/kyoso
|
|
98
|
+
/plugin install kyoso@kyoso
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
The Plugin installs the Kyoso review Skill and a local stdio MCP server pinned to a released CLI version. When you install the Plugin, `kyoso setup claude-code` is not required.
|
|
102
|
+
|
|
103
|
+
3. Alternatively, register MCP and install the review skill.
|
|
56
104
|
|
|
57
105
|
```bash
|
|
58
106
|
npx @kyo-so/cli setup claude-code --write
|
|
59
107
|
bunx @kyo-so/cli setup claude-code --write
|
|
60
108
|
```
|
|
61
109
|
|
|
62
|
-
|
|
110
|
+
For manual MCP registration, use `examples/claude-code-mcp.json`.
|
|
111
|
+
|
|
112
|
+
4. Verify the setup.
|
|
63
113
|
|
|
64
114
|
```bash
|
|
65
115
|
npx @kyo-so/cli doctor
|
|
66
116
|
bunx @kyo-so/cli doctor
|
|
67
117
|
```
|
|
68
118
|
|
|
69
|
-
|
|
119
|
+
5. Ask for a review from Claude Code.
|
|
70
120
|
|
|
71
121
|
```text
|
|
72
122
|
Use Kyoso plan_review on this plan before implementation.
|
|
@@ -80,21 +130,56 @@ Use Kyoso plan_review on this plan before implementation.
|
|
|
80
130
|
codex login
|
|
81
131
|
```
|
|
82
132
|
|
|
83
|
-
2.
|
|
133
|
+
2. Install the Marketplace Plugin (recommended).
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
codex plugin marketplace add hokupod/kyoso
|
|
137
|
+
codex plugin add kyoso@kyoso
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
You can also select Kyoso from the Codex desktop Plugins page or `/plugins`; refresh or restart the desktop app if a newly added marketplace is not visible. Check the installation with `codex plugin list --marketplace kyoso --json`, and remove the Plugin with `codex plugin remove kyoso@kyoso`. When you install the Plugin, `kyoso setup codex` is not required.
|
|
141
|
+
|
|
142
|
+
Codex Auto mode may reject Kyoso tool calls that require approval. To pre-approve them for your account, add the following to `~/.codex/config.toml` (or `$CODEX_HOME/config.toml` when `CODEX_HOME` is set). **Only do this if you trust Kyoso and accept that selected code and review context may be sent to the configured external model providers.** The Plugin does not enable this by default.
|
|
143
|
+
|
|
144
|
+
```toml
|
|
145
|
+
[plugins."kyoso@kyoso".mcp_servers.kyoso.tools.diff_review]
|
|
146
|
+
approval_mode = "approve"
|
|
147
|
+
|
|
148
|
+
[plugins."kyoso@kyoso".mcp_servers.kyoso.tools.plan_review]
|
|
149
|
+
approval_mode = "approve"
|
|
150
|
+
|
|
151
|
+
[plugins."kyoso@kyoso".mcp_servers.kyoso.tools.security_review]
|
|
152
|
+
approval_mode = "approve"
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
When Kyoso is registered directly as an MCP server (`kyoso setup codex --write` or manual setup) instead of the Plugin, use the `mcp_servers.kyoso` keys without the `plugins."kyoso@kyoso".` prefix:
|
|
156
|
+
|
|
157
|
+
```toml
|
|
158
|
+
[mcp_servers.kyoso.tools.diff_review]
|
|
159
|
+
approval_mode = "approve"
|
|
160
|
+
|
|
161
|
+
[mcp_servers.kyoso.tools.plan_review]
|
|
162
|
+
approval_mode = "approve"
|
|
163
|
+
|
|
164
|
+
[mcp_servers.kyoso.tools.security_review]
|
|
165
|
+
approval_mode = "approve"
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
3. Alternatively, register MCP and install the review skill.
|
|
84
169
|
|
|
85
170
|
```bash
|
|
86
171
|
npx @kyo-so/cli setup codex --write
|
|
87
172
|
bunx @kyo-so/cli setup codex --write
|
|
88
173
|
```
|
|
89
174
|
|
|
90
|
-
|
|
175
|
+
4. Verify the setup.
|
|
91
176
|
|
|
92
177
|
```bash
|
|
93
178
|
npx @kyo-so/cli doctor
|
|
94
179
|
bunx @kyo-so/cli doctor
|
|
95
180
|
```
|
|
96
181
|
|
|
97
|
-
|
|
182
|
+
5. Ask for a review from Codex.
|
|
98
183
|
|
|
99
184
|
```text
|
|
100
185
|
Use Kyoso diff_review on the current diff. I need a second opinion before merging.
|
|
@@ -142,6 +227,8 @@ kyoso doctor
|
|
|
142
227
|
kyoso init
|
|
143
228
|
kyoso setup codex
|
|
144
229
|
kyoso setup claude-code
|
|
230
|
+
kyoso setup codex --write --skill-only
|
|
231
|
+
kyoso setup claude-code --write --skill-only
|
|
145
232
|
```
|
|
146
233
|
|
|
147
234
|
## Usage Examples
|
|
@@ -204,11 +291,13 @@ MCP stdout is reserved for protocol messages. Logs go to stderr or local audit t
|
|
|
204
291
|
|
|
205
292
|
The bundled `kyoso-review` skill is intentionally narrow. It should trigger only when you explicitly ask for Kyoso, multi-agent review, plan review, security review, CISA Secure by Design review, or diff review.
|
|
206
293
|
|
|
207
|
-
The
|
|
294
|
+
The Skill uses the first available path: Kyoso MCP tools, an installed `kyoso` on `PATH`, `npx -y @kyo-so/cli`, then `bunx @kyo-so/cli`. The package-runner fallbacks may need network access and can drift to a newer version, so an installed CLI is the normal MCP-less path.
|
|
295
|
+
|
|
296
|
+
`kyoso setup codex --write --skill-only` copies the canonical Skill directory to `.agents/skills/kyoso-review/` by default. Add `--global` to copy it to `~/.agents/skills/kyoso-review/`.
|
|
208
297
|
|
|
209
|
-
`
|
|
298
|
+
`kyoso setup claude-code --write --skill-only` copies it to `.claude/skills/kyoso-review/` by default. Add `--global` to copy it to `~/.claude/skills/kyoso-review/`.
|
|
210
299
|
|
|
211
|
-
|
|
300
|
+
Managed installs record the canonical directory digest and CLI version in `.kyoso-install.json`. Exact current or known historical copies are adopted and updated automatically. A changed or unknown copy is reported as a conflict and left untouched; `--force` replaces only that Skill directory and never removes or overwrites MCP configuration.
|
|
212
301
|
|
|
213
302
|
## Safety Model
|
|
214
303
|
|
|
@@ -222,6 +311,10 @@ Repository content, plans, diffs, and selected files are treated as untrusted da
|
|
|
222
311
|
|
|
223
312
|
Finding titles are normalized to concise English for aggregation; evidence, recommendations, and summaries can remain in the user's language.
|
|
224
313
|
|
|
314
|
+
Audit traces use a trusted user state root rather than a workspace-controlled path. On supported POSIX runtimes, Kyoso uses an absolute `$XDG_STATE_HOME` when available, otherwise `$HOME/.local/state`, only after ownership, permission, containment, and symlink checks succeed. It never silently falls back to another location: if verification or safe open fails, Audit writing is disabled for that review and a sanitized warning is returned while the review continues.
|
|
315
|
+
|
|
316
|
+
Windows, and environments where the required filesystem capabilities cannot be proven, disable Audit writing fail closed. A hostile process running as the same OS user that can modify the trusted state root or rename an already verified inode is outside this guarantee; protecting against that threat requires an OS sandbox or native dirfd-based support.
|
|
317
|
+
|
|
225
318
|
## Agent Auth
|
|
226
319
|
|
|
227
320
|
Codex uses the local `codex` login when available. No API key is required for the default subscription-backed path.
|
|
@@ -267,15 +360,15 @@ Effort works differently: Kyoso does not set an env var for it. Instead, it send
|
|
|
267
360
|
|
|
268
361
|
## Audit
|
|
269
362
|
|
|
270
|
-
Audit traces are written
|
|
363
|
+
On supported POSIX runtimes, Audit traces are written below the user state base (`$XDG_STATE_HOME` when absolute, otherwise `$HOME/.local/state`):
|
|
271
364
|
|
|
272
365
|
```text
|
|
273
|
-
|
|
366
|
+
<state-base>/kyoso/workspaces/<sha256(realpath(cwd))>/<logical audit.directory>/<yyyy-mm-dd>/<traceId>.jsonl
|
|
274
367
|
```
|
|
275
368
|
|
|
276
|
-
|
|
369
|
+
`audit.directory` is a logical relative directory (default: `.kyoso/traces`), not a directory in the workspace. Existing workspace `.kyoso/traces` files are not migrated or deleted automatically.
|
|
277
370
|
|
|
278
|
-
|
|
371
|
+
Raw agent output and raw file contents are disabled by default. If `audit.includeRawAgentOutput` is enabled, traces may persist sensitive review output; delete old traces according to your local retention policy. On Windows or an environment without proven safe filesystem capabilities, Audit trace writing stays disabled and the review returns a sanitized warning.
|
|
279
372
|
|
|
280
373
|
## Config
|
|
281
374
|
|