mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-24 11:25:50 -06:00
refactor(agents): drop mcp fetch type re-export
This commit is contained in:
@@ -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>;
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user