Class: Evilution::MCP::SessionDiffTool Deprecated
- Inherits:
-
MCP::Tool
- Object
- MCP::Tool
- Evilution::MCP::SessionDiffTool
- Defined in:
- lib/evilution/mcp/session_diff_tool.rb
Overview
Deprecated.
Superseded by SessionTool (action: “diff”) as of 0.22.8. No longer registered with the MCP server; retained only for direct Ruby callers. Will be removed entirely — tracked by EV-h8pw / GH #686.
Class Method Summary collapse
-
.call(server_context:, base: nil, head: nil) ⇒ Object
rubocop:disable Lint/UnusedMethodArgument.
Class Method Details
.call(server_context:, base: nil, head: nil) ⇒ Object
rubocop:disable Lint/UnusedMethodArgument
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/evilution/mcp/session_diff_tool.rb', line 33 def call(server_context:, base: nil, head: nil) return error_response("config_error", "base is required") unless base return error_response("config_error", "head is required") unless head store = Evilution::Session::Store.new base_data = store.load(base) head_data = store.load(head) diff = Evilution::Session::Diff.new result = diff.call(base_data, head_data) ::MCP::Tool::Response.new([{ type: "text", text: ::JSON.generate(result.to_h) }]) rescue Evilution::Error => e error_response("not_found", e.) rescue ::JSON::ParserError => e error_response("parse_error", e.) rescue SystemCallError => e error_response("runtime_error", e.) end |