mcp-scraper 0.26.2 → 0.26.3

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.
@@ -17,7 +17,6 @@ import {
17
17
  } from "./chunk-E5J4HJBO.js";
18
18
  import {
19
19
  HttpMcpToolExecutor,
20
- MemoryMcpToolExecutor,
21
20
  assessTranscriptSignal,
22
21
  buildLinkGraph,
23
22
  buildPaaExtractorMcpServer,
@@ -35,7 +34,7 @@ import {
35
34
  sanitizeAttempts,
36
35
  sanitizeHarvestResult,
37
36
  transcribeMediaUrl
38
- } from "./chunk-QO2TRJ3L.js";
37
+ } from "./chunk-73YM3DEB.js";
39
38
  import {
40
39
  auditImages,
41
40
  buildLinkReport,
@@ -76,7 +75,7 @@ import {
76
75
  RawMapsOverviewSchema,
77
76
  RawMapsReviewStatsSchema
78
77
  } from "./chunk-XGIPATLV.js";
79
- import "./chunk-V37MZON3.js";
78
+ import "./chunk-27VXTOD2.js";
80
79
  import {
81
80
  completeExtractJob,
82
81
  countSuccessfulPages,
@@ -16515,6 +16514,42 @@ serpIntelligenceApp.post("/page-snapshots", async (c) => {
16515
16514
  import { Hono as Hono17 } from "hono";
16516
16515
  import { WebStandardStreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js";
16517
16516
 
16517
+ // src/mcp/memory-mcp-tool-executor.ts
16518
+ var MemoryMcpToolExecutor = class {
16519
+ baseUrl;
16520
+ apiKey;
16521
+ constructor(baseUrl, apiKey) {
16522
+ this.baseUrl = baseUrl.replace(/\/$/, "");
16523
+ this.apiKey = apiKey;
16524
+ }
16525
+ async callMemoryTool(toolName, args) {
16526
+ try {
16527
+ const res = await fetch(`${this.baseUrl}/memory/mcp-call`, {
16528
+ method: "POST",
16529
+ headers: {
16530
+ "content-type": "application/json",
16531
+ "x-api-key": this.apiKey
16532
+ },
16533
+ body: JSON.stringify({ toolName, args })
16534
+ });
16535
+ const data = await res.json().catch(() => null);
16536
+ if (!res.ok) {
16537
+ const message = data?.error ?? `memory ${toolName} failed (HTTP ${res.status})`;
16538
+ return { content: [{ type: "text", text: message }], isError: true };
16539
+ }
16540
+ const result = data ?? { ok: false, error: `memory ${toolName} returned no result` };
16541
+ return {
16542
+ content: [{ type: "text", text: JSON.stringify(result) }],
16543
+ structuredContent: result,
16544
+ isError: false
16545
+ };
16546
+ } catch (err) {
16547
+ const message = err instanceof Error ? err.message : `memory ${toolName} call failed`;
16548
+ return { content: [{ type: "text", text: message }], isError: true };
16549
+ }
16550
+ }
16551
+ };
16552
+
16518
16553
  // src/mcp/memory-inprocess-executor.ts
16519
16554
  var CUTOVER = /* @__PURE__ */ new Map();
16520
16555
  function registerCutover(upstreamName, handler) {
@@ -27145,4 +27180,4 @@ app.get("/blog/:slug/", (c) => {
27145
27180
  export {
27146
27181
  app
27147
27182
  };
27148
- //# sourceMappingURL=server-K6ODZOZA.js.map
27183
+ //# sourceMappingURL=server-GN34MGAE.js.map