From cc2373f1016c3a0a75848ec79692bcb44e25f699 Mon Sep 17 00:00:00 2001 From: agent_coder Date: Sun, 12 Jul 2026 05:31:39 +0300 Subject: [PATCH] fix(search): whitelist #529 search response-fields in the #494 prose drift-guard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The rebase pulled develop's #494 REVERSE prose drift-guard, which flags every camelCase token in ROUTING_PROSE that is not a registered MCP tool. #529's search routing prose documents the search RESPONSE fields matchedTerms/matchedFields/ hasMore/truncatedAtCap — genuine non-tool terms — so add them to PROSE_NON_TOOL_TERMS (develop's designed allowlist). Reconciles both invariants: #529's search-prose enforcement and #494's dead-reference guard both stay green. Co-Authored-By: Claude Opus 4.8 (1M context) --- packages/mcp/src/server-instructions.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/mcp/src/server-instructions.ts b/packages/mcp/src/server-instructions.ts index 48b4805d..c919b864 100644 --- a/packages/mcp/src/server-instructions.ts +++ b/packages/mcp/src/server-instructions.ts @@ -72,6 +72,12 @@ export const PROSE_NON_TOOL_TERMS: ReadonlySet = new Set([ "parentCommentId", "suggestedText", "historyId", + // search RESPONSE fields documented in the routing prose (#529) — schema + // fields the search tool returns, not tools themselves + "matchedTerms", + "matchedFields", + "hasMore", + "truncatedAtCap", // helper / value fragments "orderedList", // "orderedList.type" (a dropped attr, not a tool) "mxGraph", // "mxGraph XML"