refactor(agents): drop mcp fetch type re-export

This commit is contained in:
Vincent Koc
2026-06-17 09:49:15 +08:00
parent 66fde5a467
commit 0c651fd082
2 changed files with 1 additions and 4 deletions
+1 -1
View File
@@ -1,4 +1,5 @@
import { parseErrorResponse } from "@modelcontextprotocol/sdk/client/auth.js";
import type { FetchLike } from "@modelcontextprotocol/sdk/shared/transport.js";
/**
* Regression coverage for MCP HTTP fetch wrappers.
* Verifies SSRF-guarded fetch, scoped dispatcher behavior, and same-origin headers.
@@ -9,7 +10,6 @@ import {
buildMcpHttpFetch,
withoutMcpAuthorizationHeader,
withSameOriginMcpHttpHeaders,
type FetchLike,
} from "./mcp-http-fetch.js";
const testGlobal = globalThis as Record<string, unknown>;
-3
View File
@@ -12,9 +12,6 @@ import {
} from "../infra/net/ssrf.js";
import { loadUndiciRuntimeDeps } from "../infra/net/undici-runtime.js";
/** MCP SDK-compatible fetch function type. */
export type { FetchLike };
/** Default MCP HTTP fetch backed by lazy-loaded undici runtime deps. */
const fetchWithUndici: FetchLike = async (url, init) =>
(await loadUndiciRuntimeDeps().fetch(