From 42bd298778370c0370ea65626ac660401b9deabd Mon Sep 17 00:00:00 2001 From: Junjun Zhang Date: Tue, 20 Oct 2026 21:38:49 +0800 Subject: [PATCH] chore: remove confirmed dead code Remove unused -32042 URL elicitation cluster from internal/mcp/elicitation.go (round 73 daemon+mcp rotation scan): - ErrCodeURLElicitationRequired const: zero references repo-wide (errorcodes_test uses the -32042 literal, not the const) - URLElicitationRequiredInfo type: sole field usage was inside URLElicitationRequiredData; zero external references - URLElicitationRequiredData type: zero references repo-wide Verified via rg -F full-repo scan (r72 three-stage pipeline): exported-func external check, intra-package non-test check, raw full-repo final check. go build -tags goolm ./..., go vet, gofmt, and full internal/mcp test suite all pass. Co-Authored-By: ggcode --- internal/mcp/elicitation.go | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/internal/mcp/elicitation.go b/internal/mcp/elicitation.go index eeac9d4e5..5df7802a7 100644 --- a/internal/mcp/elicitation.go +++ b/internal/mcp/elicitation.go @@ -70,26 +70,6 @@ const ( ElicitationModeURL = "url" ) -// ErrCodeURLElicitationRequired is the JSON-RPC error code (-32042) a server -// returns when a tool call cannot proceed until a URL mode elicitation is -// completed (MCP 2025-11-25). The error data carries the required -// elicitations; see URLElicitationRequiredData. -const ErrCodeURLElicitationRequired = -32042 - -// URLElicitationRequiredInfo is one required URL mode elicitation entry from -// a -32042 URLElicitationRequiredError's data payload. -type URLElicitationRequiredInfo struct { - Mode string `json:"mode"` - ElicitationID string `json:"elicitationId"` - URL string `json:"url"` - Message string `json:"message"` -} - -// URLElicitationRequiredData is the data payload of -32042 errors. -type URLElicitationRequiredData struct { - Elicitations []URLElicitationRequiredInfo `json:"elicitations"` -} - // ElicitationParams is the parameters for an elicitation/create request. type ElicitationParams struct { // Mode selects the elicitation mode: "form" (default) or "url" per