AI/Tasks/CurrentTask.txt

**Task:**
Apply a minimal, surgical refactor to `ToolWrapper.cs` that removes legacy support for the `FETCH-URL` and `SEARCH-WEB` tool names.
Do **not** modify any other logic, behavior, or signatures except where explicitly required by the removal.
 
---
 
## **Patch Requirements**
 
### **1. Remove the FETCH‑URL argument injection block**
 
Delete this entire block:
 
```
if (
    string.Equals(toolName, "FETCH-URL", StringComparison.OrdinalIgnoreCase)
    && !args.ContainsKey("__allowed_fetch_hosts")
)
{
    args["__allowed_fetch_hosts"] = normalizedFetchHosts;
}
```
 
---
 
### **2. Remove the SEARCH‑WEB argument injection block**
 
Delete this entire block:
 
```
if (string.Equals(toolName, "SEARCH-WEB", StringComparison.OrdinalIgnoreCase))
{
    if (!HasArgument(args, "__search_web_provider"))
        args["__search_web_provider"] = normalizedSearchWebProvider;
 
    if (!HasArgument(args, "__search_web_endpoint"))
        args["__search_web_endpoint"] = normalizedSearchWebEndpoint;
 
    if (!HasArgument(args, "__search_web_api_key_env_var"))
        args["__search_web_api_key_env_var"] = normalizedSearchWebApiKeyEnvVar;
 
    if (!HasArgument(args, "__search_web_country")
        && !string.IsNullOrWhiteSpace(normalizedSearchWebCountry))
    {
        args["__search_web_country"] = normalizedSearchWebCountry;
    }
 
    if (!HasArgument(args, "__search_web_language")
        && !string.IsNullOrWhiteSpace(normalizedSearchWebLanguage))
    {
        args["__search_web_language"] = normalizedSearchWebLanguage;
    }
 
    if (!HasArgument(args, "__search_web_safe_search")
        && !string.IsNullOrWhiteSpace(normalizedSearchWebSafeSearch))
    {
        args["__search_web_safe_search"] = normalizedSearchWebSafeSearch;
    }
 
    if (!HasArgument(args, "count") && normalizedSearchWebDefaultCount > 0)
    {
        args["count"] = normalizedSearchWebDefaultCount;
    }
}
```
 
---
 
### **3. Remove unused normalization variables**
 
Delete these local variables from the top of `BuildTools`:
 
```
var normalizedFetchHosts = NormalizeFetchHosts(allowedFetchHosts);
 
var normalizedSearchWebProvider = NormalizeSearchWebProvider(searchWebProvider);
var normalizedSearchWebEndpoint = NormalizeSearchWebEndpoint(searchWebEndpoint);
var normalizedSearchWebApiKeyEnvVar = NormalizeSearchWebApiKeyEnvVar(searchWebApiKeyEnvVar);
var normalizedSearchWebCountry = NormalizeSearchWebCountry(searchWebCountry);
var normalizedSearchWebLanguage = NormalizeSearchWebLanguage(searchWebLanguage);
var normalizedSearchWebSafeSearch = NormalizeSearchWebSafeSearch(searchWebSafeSearch);
var normalizedSearchWebDefaultCount = Math.Clamp(searchWebDefaultCount, 1, 50);
```
 
---
 
### **4. Remove the normalization helper methods**
 
Delete these methods entirely:
 
```
NormalizeFetchHosts
NormalizeSearchWebProvider
NormalizeSearchWebEndpoint
NormalizeSearchWebApiKeyEnvVar
NormalizeSearchWebCountry
NormalizeSearchWebLanguage
NormalizeSearchWebSafeSearch
```
 
---
 
### **5. Remove unused parameters from both BuildTools overloads**
 
Remove the following parameters from **both** method signatures:
 
```
IEnumerable<string>? allowedFetchHosts
string? searchWebProvider
string? searchWebEndpoint
string? searchWebApiKeyEnvVar
string? searchWebCountry
string? searchWebLanguage
string? searchWebSafeSearch
int searchWebDefaultCount
```
 
Ensure all call sites and overloads are updated accordingly.
 
---
 
## **Constraints**
 
- Do **not** modify any other logic.
- Do **not** alter destructive approval behavior.
- Do **not** alter RUN‑SHELL behavior.
- Do **not** alter compatibility executor behavior.
- Do **not** rename or restructure unrelated code.
- Do **not** introduce new functionality.
- This patch must be **strictly subtractive**.
 
---
 
## **Expected Output**
 
Produce:
 
1. A unified diff (`.patch`) showing the exact deletions.
2. A short confirmation summary of what was removed.
3. No additional commentary.