mcp-searxng 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/url-reader.js +6 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
|
-
declare const packageVersion = "1.0.
|
|
3
|
+
declare const packageVersion = "1.0.5";
|
|
4
4
|
export { packageVersion };
|
|
5
5
|
export declare function isWebUrlReadArgs(args: unknown): args is {
|
|
6
6
|
url: string;
|
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import { fetchAndConvertToMarkdown } from "./url-reader.js";
|
|
|
10
10
|
import { createConfigResource, createHelpResource } from "./resources.js";
|
|
11
11
|
import { createHttpServer } from "./http-server.js";
|
|
12
12
|
// Use a static version string that will be updated by the version script
|
|
13
|
-
const packageVersion = "1.0.
|
|
13
|
+
const packageVersion = "1.0.5";
|
|
14
14
|
// Export the version for use in other modules
|
|
15
15
|
export { packageVersion };
|
|
16
16
|
// Type guard for URL reading args
|
package/dist/url-reader.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { isIP } from "node:net";
|
|
2
2
|
import { NodeHtmlMarkdown } from "node-html-markdown";
|
|
3
|
+
import { fetch as undiciFetch } from "undici";
|
|
3
4
|
import { createProxyAgent, createDefaultAgent, ProxyType } from "./proxy.js";
|
|
4
5
|
import { logMessage } from "./logging.js";
|
|
5
6
|
import { urlCache } from "./cache.js";
|
|
@@ -195,8 +196,11 @@ export async function fetchAndConvertToMarkdown(mcpServer, url, timeoutMs = 1000
|
|
|
195
196
|
}
|
|
196
197
|
let response;
|
|
197
198
|
try {
|
|
198
|
-
// Fetch the URL with the abort signal
|
|
199
|
-
|
|
199
|
+
// Fetch the URL with the abort signal.
|
|
200
|
+
// Use undici's own fetch so it shares the same internal version as the
|
|
201
|
+
// Agent/ProxyAgent dispatcher — avoids the Node.js bundled-undici vs
|
|
202
|
+
// npm-undici version mismatch that breaks Content-Encoding decompression.
|
|
203
|
+
response = await undiciFetch(url, requestOptions);
|
|
200
204
|
}
|
|
201
205
|
catch (error) {
|
|
202
206
|
const context = {
|