refactor(mcp): usagi-session を usagi サーバに統合#177
Merged
Conversation
issue/memory を公開する usagi サーバとセッション操作を公開する usagi-session サーバを、単一の usagi サーバ(usagi mcp)に統合する。 エージェントは MCP サーバを 1 つ登録するだけで issue・memory・session の 全 tool を使えるようになる。 - presentation/mcp/usagi.rs を新設。UsagiMcpServer が issue/memory サーバと session サーバを合成し、tool のマージと振り分けを担う。 - usagi mcp が UsagiMcpServer を起動。session_prompt 用の本番 AgentBackend も cli/mcp.rs へ集約。 - usagi session-mcp コマンドと cli/session_mcp.rs を削除。 - エージェント起動の --mcp-config を usagi 1 エントリに変更。 - ドキュメント(03-mcp.md ほか)を統合後の構成に更新し、05-session-mcp.md を削除。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
📊 Test Coverage
🎉✨ パーフェクト!全ファイル Lines カバレッジ 100% を達成しました 🏆🐰 |
Merged
kkyosuke
added a commit
that referenced
this pull request
Jun 18, 2026
## 目的 `Cargo.toml` の version を `0.0.2` → `0.0.3` に上げ、リリース自動化(`auto-release.yml`)を起動する。 ## 変更内容 - `Cargo.toml` / `Cargo.lock` の version を `0.0.3` に更新。 ## v0.0.2 以降の主な変更 ### 機能追加 (feat) - メモリ機能を追加(CLI / MCP / 永続化)(#169) - 在席モードに close コマンドを追加 / close 後は切替モードへ移る (#173, #180) - 統括の入力欄で行内カーソル移動を可能にする (#174) - ルート行とセッション群の間に区切り線を常設 (#176) - 処理中に右上へローディングうさぎを表示 (#179) - ready のアイコンを月(☾)に変更 (#166) ### 修正 (fix) - ターミナルのリサイズで終了するのを防ぐ (#168) - コンパクション後の SessionStart で Ready のまま固まるのを修正 (#171) - Session Action UI の反映漏れを修正 (#170) ### パフォーマンス (perf) - 検索バグ・ホットループ最適化(High 項目)(#165) - 一時ファイル競合・git 起動削減(Medium 項目)(#167) - inspect_worktree の git プロセス起動を削減 (#178) ### リファクタ / その他 - usagi-session を usagi サーバに統合 (#177) - エージェント向けコマンドを CLI ヘルプから隠す (#172) ## テスト・確認方法 - `cargo update -p usagi` で Cargo.lock を更新済み。 - マージ後、`auto-release.yml` が version 変更を検知し `v0.0.3` タグとリリースを自動生成する。 Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
目的
MCP サーバが
usagi(issue・memory)とusagi-session(session)の 2 つに分かれており、エージェント側で 2 サーバの登録が必要だった。これを単一のusagiサーバに統合し、usagi mcpの 1 登録だけで issue・memory・session の全 tool を使えるようにする。変更内容
presentation/mcp/usagi.rsを新設:UsagiMcpServerが issue/memory サーバ(mcp/issue/)と session サーバ(mcp/session.rs)を合成。tools/listで 15 tool(issue 6 + memory 6 + session 3)を 1 サーバで公開し、tools/callを tool 名で各サーバへ振り分ける。session_promptで実エージェントを起動するAgentBackendが必要)は依存が異なるため、独立サーバ・独立テストのまま合成する設計。usagi mcp(cli/mcp.rs)がUsagiMcpServerを起動。session_prompt用の本番AgentBackend(旧session_mcp.rsのシェルアウト)もここへ集約。usagi session-mcpコマンドとcli/session_mcp.rsを削除。domain/settings.rs): 自動 wire する--mcp-configをusagi1 エントリに変更(usagi-sessionを削除)。03-mcp.mdを統合サーバの正本として再構成(session tool・session_promptの挙動・アーキテクチャを追記)、05-session-mcp.mdを削除。01-cli.md/01-overview.md/02-architecture.md/04-orchestration.md/ 各 README の参照を更新。scripts/coverage.shの除外リストからsession_mcp.rsを削除。テスト・確認方法
cargo fmt/cargo clippy --all-targets -- -D warningsクリーンcargo test全テスト合格(失敗 0)usagi mcpのtools/listがusagi名で 15 tool を返す/usagi session-mcpはunrecognized subcommand補足
エージェント起動時に usagi が自動生成する MCP 設定は本 PR で
usagi1 エントリになる。手動でusagi_sessionを登録している環境では、そのエントリを削除すれば session tool もusagiから使える。🤖 Generated with Claude Code