mcp-scraper 0.1.1 → 0.1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-scraper",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "MCP server for MCP Scraper web intelligence tools",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -41,14 +41,23 @@
41
41
  "test:e2e": "playwright test"
42
42
  },
43
43
  "dependencies": {
44
+ "@modelcontextprotocol/sdk": "^1.29.0",
45
+ "zod": "^3.23.0"
46
+ },
47
+ "devDependencies": {
44
48
  "@anthropic-ai/sdk": "^0.96.0",
45
49
  "@distube/ytdl-core": "^4.16.12",
46
50
  "@fal-ai/client": "^1.10.1",
47
51
  "@hono/node-server": "^2.0.2",
48
52
  "@libsql/client": "^0.17.3",
49
- "@modelcontextprotocol/sdk": "^1.29.0",
53
+ "@onkernel/cli": "^0.19.2",
50
54
  "@onkernel/sdk": "^0.52.0",
55
+ "@playwright/test": "^1.60.0",
51
56
  "@resvg/resvg-js": "^2.6.2",
57
+ "@types/better-sqlite3": "^7.6.13",
58
+ "@types/jsdom": "^28.0.3",
59
+ "@types/node": "^20.0.0",
60
+ "@types/papaparse": "^5.3.0",
52
61
  "@types/turndown": "^5.0.6",
53
62
  "better-sqlite3": "^12.9.0",
54
63
  "bgutils-js": "^3.2.0",
@@ -56,6 +65,7 @@
56
65
  "dotenv": "^17.4.2",
57
66
  "hono": "^4.12.18",
58
67
  "inngest": "^4.4.0",
68
+ "jsdom": "^29.1.1",
59
69
  "p-limit": "^7.3.0",
60
70
  "papaparse": "^5.4.0",
61
71
  "playwright": "^1.44.0",
@@ -64,23 +74,13 @@
64
74
  "resend": "^6.12.3",
65
75
  "satori": "^0.26.0",
66
76
  "stripe": "^22.1.1",
67
- "turndown": "^7.2.4",
68
- "youtube-transcript": "^1.3.1",
69
- "youtubei.js": "^17.0.1",
70
- "zod": "^3.23.0"
71
- },
72
- "devDependencies": {
73
- "@onkernel/cli": "^0.19.2",
74
- "@playwright/test": "^1.60.0",
75
- "@types/better-sqlite3": "^7.6.13",
76
- "@types/jsdom": "^28.0.3",
77
- "@types/node": "^20.0.0",
78
- "@types/papaparse": "^5.3.0",
79
- "jsdom": "^29.1.1",
80
77
  "tsup": "^8.0.0",
81
78
  "tsx": "^4.0.0",
79
+ "turndown": "^7.2.4",
82
80
  "typescript": "^5.4.0",
83
- "vitest": "^1.6.0"
81
+ "vitest": "^1.6.0",
82
+ "youtube-transcript": "^1.3.1",
83
+ "youtubei.js": "^17.0.1"
84
84
  },
85
85
  "engines": {
86
86
  "node": ">=20"
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/mcp/paa-mcp-server.ts","../src/mcp/mcp-tool-schemas.ts","../src/mcp/mcp-response-formatter.ts","../src/mcp/http-mcp-tool-executor.ts"],"sourcesContent":["import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'\nimport type { IMcpToolExecutor } from './IMcpToolExecutor.js'\nimport {\n HarvestPaaInputSchema,\n SearchSerpInputSchema,\n ExtractUrlInputSchema,\n MapSiteUrlsInputSchema,\n ExtractSiteInputSchema,\n YoutubeHarvestInputSchema,\n YoutubeTranscribeInputSchema,\n FacebookPageIntelInputSchema,\n FacebookAdSearchInputSchema,\n FacebookAdTranscribeInputSchema,\n MapsPlaceIntelInputSchema,\n CreditsInfoInputSchema,\n} from './mcp-tool-schemas.js'\nimport {\n formatHarvestPaa,\n formatSearchSerp,\n formatExtractUrl,\n formatMapSiteUrls,\n formatExtractSite,\n formatYoutubeHarvest,\n formatYoutubeTranscribe,\n formatFacebookPageIntel,\n formatFacebookAdSearch,\n formatFacebookAdTranscribe,\n formatMapsPlaceIntel,\n formatCreditsInfo,\n} from './mcp-response-formatter.js'\n\nexport function buildPaaExtractorMcpServer(executor: IMcpToolExecutor): McpServer {\n const server = new McpServer({ name: 'mcp-scraper', version: '1.0.0' })\n\n server.registerTool('harvest_paa', {\n description: 'Best default tool for Google search research. Extracts People Also Ask questions plus answers/source URLs, organic SERP, local pack when present, entity IDs (CID/GCID/KG MID), and AI Overview. Infer the user language: split topic from location (e.g. \"best hvac company in Denver CO\" => query \"best hvac company\", location \"Denver, CO\", gl \"us\", hl \"en\"). Use maxQuestions 30 normally, 100-150 for \"full\", \"deep\", \"all\", or comprehensive research. Credits are charged by extracted question; unused request hold is refunded. Saves a full Markdown report locally.',\n inputSchema: HarvestPaaInputSchema,\n }, async (input) => formatHarvestPaa(await executor.harvestPaa(input), input))\n\n server.registerTool('search_serp', {\n description: 'Fast Google SERP lookup without PAA expansion. Use when the user asks for rankings, organic results, local pack, quick SERP, or positions. Split topic from location and infer gl/hl from the user request. Saves a full Markdown report locally.',\n inputSchema: SearchSerpInputSchema,\n }, async (input) => formatSearchSerp(await executor.searchSerp(input), input))\n\n server.registerTool('extract_url', {\n description: 'Extract structured data from one public URL: page content as Markdown, heading structure, JSON-LD schema, entity details, NAP score, metadata, and missing schema fields. Use when the user provides a single URL or asks to inspect/scrape one page. Saves a full Markdown report locally.',\n inputSchema: ExtractUrlInputSchema,\n }, async (input) => formatExtractUrl(await executor.extractUrl(input), input))\n\n server.registerTool('map_site_urls', {\n description: 'Map/crawl a public website to build a URL inventory with HTTP status codes, broken links, redirects, and site scope. Use before extract_site for audits or when the user asks for a sitemap/URL inventory. Saves a full Markdown report locally.',\n inputSchema: MapSiteUrlsInputSchema,\n }, async (input) => formatMapSiteUrls(await executor.mapSiteUrls(input), input))\n\n server.registerTool('extract_site', {\n description: 'Run multi-page extraction across a public website. Returns per-page titles, H1s, metadata, headings, schema/entity data, canonical URLs, and content. Use for website audits, competitor audits, and full-site extraction. Saves a full Markdown report locally.',\n inputSchema: ExtractSiteInputSchema,\n }, async (input) => formatExtractSite(await executor.extractSite(input), input))\n\n server.registerTool('youtube_harvest', {\n description: 'Harvest YouTube video metadata by search query or channel handle/ID/URL. Use mode \"search\" for keyword/topic requests and mode \"channel\" for @handles, channel IDs, or channel URLs. Returns titles, views, dates, durations, URLs, thumbnails, and videoIds for follow-up transcription. Saves a full Markdown report locally.',\n inputSchema: YoutubeHarvestInputSchema,\n }, async (input) => formatYoutubeHarvest(await executor.youtubeHarvest(input), input))\n\n server.registerTool('youtube_transcribe', {\n description: 'Fetch and transcribe captions from a YouTube video. Returns full transcript, timestamped chunks, and word count. Pass a videoId from youtube_harvest results or infer it from a YouTube URL if the user provided one. Saves a full Markdown report locally.',\n inputSchema: YoutubeTranscribeInputSchema,\n }, async (input) => formatYoutubeTranscribe(await executor.youtubeTranscribe(input), input))\n\n server.registerTool('facebook_page_intel', {\n description: 'Harvest ads from a Facebook advertiser. Returns ad copy, headlines, CTAs, creative type, status, landing URLs, and video URLs ready for transcription. Accepts pageId, libraryId, or a brand/advertiser name as query. Use after facebook_ad_search when possible. Saves a full Markdown report locally.',\n inputSchema: FacebookPageIntelInputSchema,\n }, async (input) => formatFacebookPageIntel(await executor.facebookPageIntel(input), input))\n\n server.registerTool('facebook_ad_search', {\n description: 'Search Facebook Ad Library by brand, advertiser, competitor, niche, or keyword. Returns advertisers with ad counts and library IDs. Use to discover competitors, then pass libraryId to facebook_page_intel. Saves a full Markdown report locally.',\n inputSchema: FacebookAdSearchInputSchema,\n }, async (input) => formatFacebookAdSearch(await executor.facebookAdSearch(input), input))\n\n server.registerTool('facebook_ad_transcribe', {\n description: 'Transcribe audio from a Facebook ad video. Returns full transcript and timestamped chunks. Use the videoUrl value from facebook_page_intel results.',\n inputSchema: FacebookAdTranscribeInputSchema,\n }, async (input) => formatFacebookAdTranscribe(await executor.facebookAdTranscribe(input), input))\n\n server.registerTool('maps_place_intel', {\n description: 'Extract Google Maps business intelligence for a named business: rating, review count, category, address, phone, website, hours, booking URL, review histogram, review topics, about attributes, entity IDs, and optional review cards. Split business name from location (e.g. \"Elite Roofing Denver CO\" => businessName \"Elite Roofing\", location \"Denver, CO\"). Pass includeReviews true when the user asks for reviews/customer pain. Saves a full Markdown report locally.',\n inputSchema: MapsPlaceIntelInputSchema,\n }, async (input) => formatMapsPlaceIntel(await executor.mapsPlaceIntel(input), input))\n\n server.registerTool('credits_info', {\n description: 'Answer questions about MCP Scraper credits: current credit balance, what a specific tool/action costs, the full cost table, and optionally recent credit ledger entries. Does not expose payment methods or credit card information.',\n inputSchema: CreditsInfoInputSchema,\n }, async (input) => formatCreditsInfo(await executor.creditsInfo(input), input))\n\n return server\n}\n","import { z } from 'zod'\n\nexport const HarvestPaaInputSchema = {\n query: z.string().min(1).describe('Core search topic only. If the user says \"best hvac company in Denver CO\", use query=\"best hvac company\" and location=\"Denver, CO\". Do not include the location in query when it can be separated.'),\n location: z.string().optional().describe('City, region, or country for geo-targeted results, inferred from the user request when present, e.g. \"Denver, CO\", \"Tokyo, Japan\", \"London, UK\".'),\n maxQuestions: z.number().int().min(1).max(150).default(30).describe('Number of PAA questions to extract. Default 30. Maximum 150. Use 10 for quick probes, 30 for normal research, 100-150 when the user asks for everything/full/deep research. Credits are charged by extracted question; unused request hold is refunded.'),\n gl: z.string().length(2).default('us').describe('Google country code inferred from location or user language. Examples: United States us, United Kingdom gb, Japan jp, Canada ca, Australia au.'),\n hl: z.string().default('en').describe('Google interface/content language inferred from the user request. Use en unless the user asks for another language or locale.'),\n device: z.enum(['desktop', 'mobile']).default('desktop').describe('SERP device context. Use desktop by default; use mobile only when the user asks for mobile rankings.'),\n proxyMode: z.enum(['location', 'configured', 'none']).default('location').describe('Proxy targeting mode. Use location by default so city/state searches create or reuse a matching residential proxy. Use configured for the static configured proxy. Use none only for direct-network debugging.'),\n proxyZip: z.string().regex(/^\\d{5}$/).optional().describe('Optional US ZIP override for residential location proxy targeting. Use only when the user gives a specific ZIP or city-center proxy targeting needs to be forced.'),\n debug: z.boolean().default(false).describe('Include sanitized browser/session/location diagnostics in the response. Use true when debugging localization, CAPTCHA, or proxy behavior.'),\n}\nexport type HarvestPaaInput = z.infer<ReturnType<typeof z.object<typeof HarvestPaaInputSchema>>>\n\nexport const ExtractUrlInputSchema = {\n url: z.string().url().describe('Public http/https URL to extract. Use this when the user provides one specific page URL.'),\n screenshot: z.boolean().default(false).describe('Also capture a full-page screenshot of the URL. Saved to ~/Downloads/mcp-scraper/screenshots/ and returned inline. Use when the user asks to see or capture the page visually.'),\n screenshotDevice: z.enum(['desktop', 'mobile']).default('desktop').describe('Viewport for screenshot. desktop = 1440×900. mobile = 390×844. Default desktop.'),\n extractBranding: z.boolean().default(false).describe('Extract brand colors, fonts, logo, and favicon using a rendered browser session. Returns colorScheme (light/dark), colors (primary/accent/background/text/heading as hex), fonts (heading/body family names), and assets (logo URL, favicon URL). Use when the user asks about brand colors, site theme, or brand assets.'),\n downloadMedia: z.boolean().default(false).describe('Extract and download all page media (images, video, audio) to ~/Downloads/mcp-scraper/media/. Ad networks, tracking pixels, and noise URLs are filtered automatically. Use when the user asks to download or harvest assets from a page.'),\n mediaTypes: z.array(z.enum(['image', 'video', 'audio'])).default(['image', 'video', 'audio']).describe('Which media types to download. Default all three.'),\n allowLocal: z.boolean().default(false).describe('Allow localhost and private-network URLs. For local development only.'),\n}\nexport type ExtractUrlInput = z.infer<ReturnType<typeof z.object<typeof ExtractUrlInputSchema>>>\n\nexport const MapSiteUrlsInputSchema = {\n url: z.string().url().describe('Public website URL or domain to crawl for internal URLs. Use before extract_site when the user asks to audit/map/crawl a site.'),\n maxUrls: z.number().int().min(1).max(500).optional().describe('Maximum URLs to discover. Use 100 for normal maps, higher when the user asks for a full inventory.'),\n}\nexport type MapSiteUrlsInput = z.infer<ReturnType<typeof z.object<typeof MapSiteUrlsInputSchema>>>\n\nexport const ExtractSiteInputSchema = {\n url: z.string().url().describe('Public website URL or domain to extract across multiple pages. Use when the user asks for a site audit, website crawl, or full-site content/schema extraction.'),\n maxPages: z.number().int().min(1).max(50).optional().describe('Maximum pages to extract. Use 50 when the user asks for full results or a complete crawl within MCP limits.'),\n}\nexport type ExtractSiteInput = z.infer<ReturnType<typeof z.object<typeof ExtractSiteInputSchema>>>\n\nexport const YoutubeHarvestInputSchema = {\n mode: z.enum(['search', 'channel']).describe('Use search for topic/keyword requests. Use channel when the user provides @handle, channel ID, or channel URL.'),\n query: z.string().optional().describe('Required when mode is search. The YouTube search topic in the user’s words.'),\n channelHandle: z.string().optional().describe('YouTube channel handle, channel ID, or URL. Examples: @mkbhd, UC..., https://youtube.com/@mkbhd.'),\n maxVideos: z.number().int().min(1).max(500).default(50).describe('Number of videos to return. Default 50. Increase when user asks for full channel/history.'),\n}\nexport type YoutubeHarvestInput = z.infer<ReturnType<typeof z.object<typeof YoutubeHarvestInputSchema>>>\n\nexport const YoutubeTranscribeInputSchema = {\n videoId: z.string().min(1).describe('YouTube video ID, e.g. dQw4w9WgXcQ'),\n}\nexport type YoutubeTranscribeInput = z.infer<ReturnType<typeof z.object<typeof YoutubeTranscribeInputSchema>>>\n\nexport const FacebookPageIntelInputSchema = {\n pageId: z.string().optional(),\n libraryId: z.string().optional(),\n query: z.string().optional().describe('Advertiser or brand name when pageId/libraryId is not known. One of pageId, libraryId, or query is required.'),\n maxAds: z.number().int().min(1).max(200).default(50),\n country: z.string().length(2).default('US'),\n}\nexport type FacebookPageIntelInput = z.infer<ReturnType<typeof z.object<typeof FacebookPageIntelInputSchema>>>\n\nexport const FacebookAdSearchInputSchema = {\n query: z.string().min(1).describe('Advertiser, brand, competitor, niche, or keyword to search in Facebook Ad Library.'),\n country: z.string().length(2).default('US'),\n maxResults: z.number().int().min(1).max(20).default(10),\n}\nexport type FacebookAdSearchInput = z.infer<ReturnType<typeof z.object<typeof FacebookAdSearchInputSchema>>>\n\nexport const FacebookAdTranscribeInputSchema = {\n videoUrl: z.string().url().describe('Facebook CDN video URL from a facebook_page_intel result'),\n}\nexport type FacebookAdTranscribeInput = z.infer<ReturnType<typeof z.object<typeof FacebookAdTranscribeInputSchema>>>\n\nexport const MapsPlaceIntelInputSchema = {\n businessName: z.string().min(1).describe('Business name only. If user says \"Elite Roofing Denver CO\", use businessName=\"Elite Roofing\" and location=\"Denver, CO\".'),\n location: z.string().min(1).describe('City/region/country where the business should be searched, e.g. \"Denver, CO\". Infer from the user request when possible.'),\n gl: z.string().length(2).default('us').describe('Google country code inferred from location.'),\n hl: z.string().length(2).default('en').describe('Language inferred from user request.'),\n includeReviews: z.boolean().default(false).describe('Whether to fetch individual review cards'),\n maxReviews: z.number().int().min(1).max(500).default(50).describe('Max review cards to return (requires includeReviews: true)'),\n}\nexport type MapsPlaceIntelInput = z.infer<ReturnType<typeof z.object<typeof MapsPlaceIntelInputSchema>>>\n\nexport const CreditsInfoInputSchema = {\n item: z.string().optional().describe('Optional tool, action, or feature to look up, e.g. \"maps reviews\", \"extract_url\", or \"YouTube transcription\"'),\n includeLedger: z.boolean().default(false).describe('Whether to include recent credit ledger entries'),\n}\nexport type CreditsInfoInput = z.infer<ReturnType<typeof z.object<typeof CreditsInfoInputSchema>>>\n\nexport const SearchSerpInputSchema = {\n query: z.string().min(1).describe('Core search topic only. Separate location when possible. If user says \"best dentist in Brooklyn NY serp\", use query=\"best dentist\" and location=\"Brooklyn, NY\".'),\n location: z.string().optional().describe('City, region, or country for geo-targeted results, inferred from user request when present.'),\n gl: z.string().length(2).default('us').describe('Google country code inferred from location or user language.'),\n hl: z.string().default('en').describe('Google interface/content language inferred from user request.'),\n device: z.enum(['desktop', 'mobile']).default('desktop').describe('SERP device context. Use desktop by default; use mobile only when the user asks for mobile rankings.'),\n proxyMode: z.enum(['location', 'configured', 'none']).default('location').describe('Proxy targeting mode. Use location by default so city/state searches create or reuse a matching residential proxy. Use configured for the static configured proxy. Use none only for direct-network debugging.'),\n proxyZip: z.string().regex(/^\\d{5}$/).optional().describe('Optional US ZIP override for residential location proxy targeting. Use only when the user gives a specific ZIP or city-center proxy targeting needs to be forced.'),\n debug: z.boolean().default(false).describe('Include sanitized browser/session/location diagnostics in the response. Use true when debugging localization, CAPTCHA, or proxy behavior.'),\n pages: z.number().int().min(1).max(2).default(1).describe('Number of result pages to fetch (1–2)'),\n}\nexport type SearchSerpInput = z.infer<ReturnType<typeof z.object<typeof SearchSerpInputSchema>>>\n\nexport const CaptureSerpSnapshotInputSchema = {\n query: z.string().min(1).describe('Core search query to capture as a structured SERP Intelligence snapshot. Separate the place into location when the user gives a city, region, country, or ZIP.'),\n location: z.string().optional().describe('City, region, country, or service area used for localized Google results. MCP Scraper records location evidence; UULE alone is not proof of localization.'),\n gl: z.string().length(2).default('us').describe('Google country code inferred from the requested market, e.g. us, gb, ca, au.'),\n hl: z.string().default('en').describe('Google interface/content language inferred from the user request.'),\n device: z.enum(['desktop', 'mobile']).default('desktop').describe('SERP device context. Use mobile only when the user asks for mobile rankings or mobile SERP evidence.'),\n proxyMode: z.enum(['location', 'configured', 'none']).default('location').describe('Proxy behavior for capture. Use location for localized residential proxy targeting, configured for the static residential proxy, and none only for direct-network debugging.'),\n proxyZip: z.string().regex(/^\\d{5}$/).optional().describe('Optional US ZIP override for residential location proxy targeting when a precise city-center or ZIP proxy is needed.'),\n pages: z.number().int().min(1).max(2).default(1).describe('Number of Google result pages to capture. Use 1 normally and 2 only when the user needs deeper ranking evidence.'),\n debug: z.boolean().default(false).describe('Include sanitized browser, proxy, and location diagnostics. Use true when debugging localization, CAPTCHA, proxy selection, or capture reliability.'),\n includePageSnapshots: z.boolean().default(false).describe('Also capture ranking-page snapshots for selected SERP URLs through the same product capture path.'),\n pageSnapshotLimit: z.number().int().min(0).max(10).default(0).describe('Maximum ranking-page snapshots to capture when includePageSnapshots is true. Use 0 when only SERP evidence is needed.'),\n}\nexport type CaptureSerpSnapshotInput = z.infer<ReturnType<typeof z.object<typeof CaptureSerpSnapshotInputSchema>>>\n\nexport const ScreenshotInputSchema = {\n url: z.string().url().describe('URL to capture as a full-page screenshot. Use http or https. Pass allowLocal: true to capture localhost or private-network URLs during development.'),\n device: z.enum(['desktop', 'mobile']).default('desktop').describe('Viewport profile. desktop = 1440×900. mobile = 390×844. Use desktop by default; use mobile when the user asks for a mobile view.'),\n allowLocal: z.boolean().default(false).describe('Allow localhost and private-network URLs (127.x, 192.168.x, 10.x, etc.). For local development only — not for production use.'),\n}\nexport type ScreenshotInput = z.infer<ReturnType<typeof z.object<typeof ScreenshotInputSchema>>>\n\nexport const CaptureSerpPageSnapshotsInputSchema = {\n urls: z.array(z.string().url()).min(1).max(25).describe('Public HTTP/HTTPS URLs to capture as SERP Intelligence page snapshots. Do not pass localhost, private IPs, file URLs, or internal admin URLs.'),\n targets: z.array(z.object({\n url: z.string().url().describe('Public HTTP/HTTPS URL to capture.'),\n sourceKind: z.enum(['organic', 'ai_citation', 'local_pack_website', 'configured_target', 'site_subject']).default('configured_target').describe('Why this page is being captured for SERP Intelligence evidence.'),\n sourcePosition: z.number().int().min(1).optional().describe('Ranking or citation position when the page came from SERP evidence.'),\n }).strict()).min(1).max(25).optional().describe('Structured page snapshot targets. Use this instead of urls when source kind or position should be preserved.'),\n maxConcurrency: z.number().int().min(1).max(5).default(2).describe('Parallel page captures. Use 2 normally; higher values can increase proxy/browser pressure.'),\n timeoutMs: z.number().int().min(1_000).max(60_000).default(15_000).describe('Per-page capture timeout in milliseconds. Increase for slow pages; timeout artifacts are returned as structured capture failures.'),\n debug: z.boolean().default(false).describe('Include sanitized browser/proxy diagnostics for page snapshot debugging. Use true for capture, network, or proxy troubleshooting.'),\n}\nexport type CaptureSerpPageSnapshotsInput = z.infer<ReturnType<typeof z.object<typeof CaptureSerpPageSnapshotsInputSchema>>>\n","import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js'\nimport { mkdirSync, writeFileSync, readFileSync } from 'node:fs'\nimport { homedir } from 'node:os'\nimport { join } from 'node:path'\n\nfunction slugifyReportName(input: string): string {\n return input\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, '-')\n .replace(/^-+|-+$/g, '')\n .slice(0, 80) || 'mcp-scraper-report'\n}\n\nfunction reportTitle(full: string): string {\n const title = full.split('\\n').find(line => line.startsWith('# '))\n return title?.replace(/^#\\s+/, '').trim() || 'MCP Scraper Report'\n}\n\nfunction saveFullReport(full: string): string | null {\n if (process.env.MCP_SCRAPER_SAVE_REPORTS === 'false') return null\n const outDir = process.env.MCP_SCRAPER_OUTPUT_DIR?.trim() || join(homedir(), 'Downloads', 'mcp-scraper')\n try {\n mkdirSync(outDir, { recursive: true })\n const stamp = new Date().toISOString().replace(/[:.]/g, '-')\n const file = join(outDir, `${stamp}-${slugifyReportName(reportTitle(full))}.md`)\n writeFileSync(file, full, 'utf8')\n return file\n } catch {\n return null\n }\n}\n\nfunction oneBlock(content: string): CallToolResult {\n const filePath = saveFullReport(content)\n const text = filePath ? `${content}\\n\\n📄 Saved: \\`${filePath}\\`` : content\n return { content: [{ type: 'text', text }] }\n}\n\nexport function passthrough(raw: CallToolResult): CallToolResult {\n return raw\n}\n\nfunction checkInsufficientBalance(raw: CallToolResult): CallToolResult | null {\n const first = raw.content.find(b => b.type === 'text')\n const text = first?.type === 'text' ? first.text : ''\n try {\n const body = JSON.parse(text || '{}') as Record<string, unknown>\n if (body.error === 'insufficient_balance') {\n return {\n isError: true,\n content: [{\n type: 'text',\n text: `Insufficient credits. Balance: ${body.balance_credits} credits. This call requires ${body.required_credits} credits. Top up at ${body.topup_url}`,\n }],\n }\n }\n } catch { }\n return null\n}\n\nfunction formatStructuredError(body: Record<string, unknown>, fallback: string): string {\n if (body.error === 'insufficient_balance') {\n return `Insufficient credits. Balance: ${body.balance_credits} credits. This call requires ${body.required_credits} credits. Top up at ${body.topup_url}`\n }\n if (body.error === 'mcp_request_timeout') {\n return typeof body.message === 'string' ? body.message : 'MCP Scraper request timed out and was cancelled.'\n }\n if (typeof body.error_code === 'string') {\n const message = typeof body.error === 'string'\n ? body.error\n : typeof body.message === 'string'\n ? body.message\n : fallback\n const retryable = body.retryable === true ? ' Retryable: yes.' : ''\n return `${body.error_code}: ${message}${retryable}${errorAttemptsSection(body)}`\n }\n if (typeof body.error === 'string') return body.error\n return fallback || 'Tool error'\n}\n\nfunction parseData(raw: CallToolResult): { data: Record<string, unknown> } | { error: string } {\n const first = raw.content.find(b => b.type === 'text')\n const text = first?.type === 'text' ? first.text : ''\n try {\n const parsed = JSON.parse(text || '{}') as Record<string, unknown>\n if (raw.isError || parsed.error || parsed.error_code) return { error: formatStructuredError(parsed, text) }\n const data = (parsed.result as Record<string, unknown>) ?? parsed\n return { data }\n } catch {\n if (raw.isError) return { error: text || 'Tool error' }\n return { error: 'Failed to parse tool response' }\n }\n}\n\nfunction entityIdsSection(ids?: { kgIds?: string[]; cids?: string[]; gcids?: string[] }): string {\n if (!ids) return ''\n const lines: string[] = []\n if (ids.kgIds?.length) lines.push(`- **Knowledge Graph MID:** ${ids.kgIds.join(', ')}`)\n if (ids.cids?.length) lines.push(`- **CID:** ${ids.cids.join(', ')}`)\n if (ids.gcids?.length) lines.push(`- **GCID:** ${ids.gcids.join(', ')}`)\n return lines.length ? `\\n## Entity IDs\\n${lines.join('\\n')}` : ''\n}\n\nfunction entityIdsSummaryLine(ids?: { kgIds?: string[]; cids?: string[]; gcids?: string[] }): string {\n if (!ids) return ''\n const parts: string[] = []\n if (ids.kgIds?.length) parts.push(`KG MID: ${ids.kgIds[0]}`)\n if (ids.cids?.length) parts.push(`CID: ${ids.cids[0]}`)\n if (ids.gcids?.length) parts.push(`GCID: ${ids.gcids[0]}`)\n return parts.length ? `\\n**Entity IDs:** ${parts.join(' · ')}` : ''\n}\n\nfunction truncate(s: string | null | undefined, max: number): string {\n if (!s) return ''\n return s.length > max ? s.slice(0, max) + '…' : s\n}\n\nfunction debugSection(debug: any): string {\n if (!debug || typeof debug !== 'object') return ''\n const request = debug.request ?? {}\n const browser = debug.browser ?? {}\n const kernel = browser.kernel ?? {}\n const network = browser.networkLocation ?? {}\n const nav = browser.serpNavigation ?? {}\n const proxyResolution = kernel.proxyResolution ?? {}\n const locationEvidence = debug.locationEvidence\n const candidates = Array.isArray(locationEvidence?.candidates)\n ? locationEvidence.candidates.slice(0, 4).map((c: any) => `${c.city}, ${c.regionCode} (${c.count})`).join(', ')\n : ''\n const lines = [\n '\\n## Debug',\n `- Proxy mode: ${request.proxyMode ?? kernel.proxyMode ?? 'unknown'} · requested proxy: ${kernel.requestedProxyIdPresent === true ? `yes (${kernel.requestedProxyIdSuffix ?? 'redacted'})` : 'no'}`,\n `- Proxy resolution: ${proxyResolution.source ?? 'unknown'}${proxyResolution.target ? ` · ${proxyResolution.target.level ?? 'city'} ${proxyResolution.target.city}, ${proxyResolution.target.state}` : ''}${proxyResolution.error ? ` · ${truncate(proxyResolution.error, 180)}` : ''}`,\n `- Browser session: ${kernel.sessionId ?? 'unknown'} · retrieved proxy: ${kernel.retrievedProxyIdPresent === true ? `yes (${kernel.retrievedProxyIdSuffix ?? 'redacted'})` : kernel.retrievedProxyIdPresent === false ? 'no' : 'unknown'}`,\n `- Browser IP geo: ${[network.ip, network.city, network.region, network.country].filter(Boolean).join(' · ') || network.error || 'unknown'}`,\n `- Google URL: ${truncate(nav.requestedUrl, 240) || 'unknown'}`,\n `- Final URL: ${truncate(nav.finalUrl, 240) || 'unknown'} · CAPTCHA: ${nav.captchaDetected === true ? 'yes' : nav.captchaDetected === false ? 'no' : 'unknown'} · redirected: ${nav.redirected === true ? 'yes' : nav.redirected === false ? 'no' : 'unknown'}`,\n ]\n if (locationEvidence) {\n lines.push(`- Location evidence: ${locationEvidence.status}${locationEvidence.expected ? ` · expected ${locationEvidence.expected.city}${locationEvidence.expected.regionCode ? `, ${locationEvidence.expected.regionCode}` : ''}` : ''}${candidates ? ` · candidates ${candidates}` : ''}`)\n }\n return lines.join('\\n')\n}\n\nfunction errorAttemptsSection(body: Record<string, unknown>): string {\n const attempts = Array.isArray(body.attempts) ? body.attempts as Array<Record<string, any>> : []\n if (attempts.length === 0) return ''\n const lines = attempts.slice(0, 5).map((attempt) => {\n const debug = attempt.debug ?? {}\n const browser = debug.browser ?? {}\n const kernel = browser.kernel ?? {}\n const proxyResolution = kernel.proxyResolution ?? {}\n const network = browser.networkLocation ?? {}\n const nav = browser.serpNavigation ?? {}\n const geo = [network.ip, network.city, network.region].filter(Boolean).join(' / ') || 'geo unknown'\n return `- Attempt ${attempt.attempt_number ?? '?'}: ${attempt.outcome ?? attempt.status ?? 'unknown'} · session ${attempt.kernel_session_id ?? kernel.sessionId ?? 'unknown'} · proxy ${debug.request?.proxyMode ?? kernel.proxyMode ?? 'unknown'}${proxyResolution.source ? `/${proxyResolution.source}` : ''} · ${geo} · CAPTCHA ${nav.captchaDetected === true ? 'yes' : nav.captchaDetected === false ? 'no' : 'unknown'} · deleted ${attempt.kernel_delete_succeeded === true ? 'yes' : attempt.kernel_delete_succeeded === false ? 'no' : 'unknown'}`\n })\n return `\\n\\nAttempts:\\n${lines.join('\\n')}`\n}\n\ninterface FlatRow { question: string; answer?: string; source_site?: string }\ninterface OrganicResult { position: number; title: string; url: string; domain: string; snippet?: string | null }\ninterface AIOverview { detected: boolean; text?: string | null }\ninterface HarvestDiagnostics { completionStatus?: string; debug?: unknown }\n\nexport function formatHarvestPaa(\n raw: CallToolResult,\n input: { query: string; maxQuestions?: number; location?: string },\n): CallToolResult {\n const parsed = parseData(raw)\n if ('error' in parsed) return { content: [{ type: 'text', text: parsed.error }], isError: true }\n const d = parsed.data\n\n const flat = (d.flat as FlatRow[]) ?? []\n const organic = (d.organicResults as OrganicResult[]) ?? []\n const entityIds = d.entityIds as { kgIds?: string[]; cids?: string[]; gcids?: string[] } | undefined\n const aiOvw = d.aiOverview as AIOverview | undefined\n const diagnostics = d.diagnostics as HarvestDiagnostics | undefined\n const durationMs = (d.stats as { durationMs?: number } | undefined)?.durationMs\n\n const paaRows = flat.map((r, i) =>\n `| ${i + 1} | ${r.question} | ${truncate(r.answer, 120)} | ${r.source_site ?? ''} |`,\n ).join('\\n')\n\n const paaTable = flat.length\n ? `## People Also Ask (${flat.length} questions)\\n| # | Question | Answer | Source |\\n|---|----------|--------|--------|\\n${paaRows}`\n : '## People Also Ask\\n*Google did not return a People Also Ask block for this query/location. SERP data was extracted successfully when available.*'\n\n const serpRows = organic.map(r =>\n `| ${r.position} | ${r.title} | [${r.domain}](${r.url}) | ${truncate(r.snippet, 100)} |`,\n ).join('\\n')\n\n const serpTable = organic.length\n ? `\\n## Organic Results (${organic.length})\\n| # | Title | URL | Snippet |\\n|---|-------|-----|----------|\\n${serpRows}`\n : ''\n\n const aiSection = aiOvw?.detected && aiOvw.text\n ? `\\n## AI Overview\\n> ${truncate(aiOvw.text, 600)}`\n : ''\n\n const statsLine = durationMs\n ? `\\n## Stats\\n- Status: ${diagnostics?.completionStatus ?? (flat.length ? 'paa_found' : 'no_paa')} · Questions: ${flat.length} · Duration: ${(durationMs / 1000).toFixed(1)}s`\n : ''\n\n const tips = `\\n---\\n💡 **Tips**\\n- Max questions: \\`maxQuestions: 150\\` (current: ${input.maxQuestions ?? 30})\\n- Organic results only: use \\`search_serp\\`\\n- Dig into a result: use \\`extract_url\\` on any organic URL`\n\n const full = `# PAA Report: \"${input.query}\"${input.location ? ` · ${input.location}` : ''}\\n\\n${paaTable}${serpTable}${entityIdsSection(entityIds)}${aiSection}${statsLine}${debugSection(diagnostics?.debug)}${tips}`\n\n const topQ = flat.slice(0, 10).map((r, i) => `${i + 1}. ${r.question}`).join('\\n')\n const topO = organic.slice(0, 5).map(r => `${r.position}. [${r.title}](${r.url}) — ${r.domain}`).join('\\n')\n\n const summary = [\n `**PAA: \"${input.query}\"** — ${flat.length} questions extracted`,\n topQ ? `\\n**Top questions:**\\n${topQ}` : '',\n organic.length ? `\\n**Top organic results:**\\n${topO}` : '',\n entityIdsSummaryLine(entityIds),\n `\\n💡 \\`maxQuestions\\` up to 150 ·Use \\`extract_url\\` to dig into any result`,\n ].filter(Boolean).join('\\n')\n\n return oneBlock(full)\n}\n\ninterface LocalBusiness { position: number; name: string; rating?: string | null; reviewCount?: string | null; websiteUrl?: string | null }\n\nexport function formatSearchSerp(\n raw: CallToolResult,\n input: { query: string; location?: string },\n): CallToolResult {\n const parsed = parseData(raw)\n if ('error' in parsed) return { content: [{ type: 'text', text: parsed.error }], isError: true }\n const d = parsed.data\n\n const organic = (d.organicResults as OrganicResult[]) ?? []\n const localPack = (d.localPack as LocalBusiness[]) ?? []\n const entityIds = d.entityIds as { kgIds?: string[]; cids?: string[]; gcids?: string[] } | undefined\n const aiOvw = d.aiOverview as AIOverview | undefined\n const diagnostics = d.diagnostics as HarvestDiagnostics | undefined\n\n const serpRows = organic.map(r =>\n `| ${r.position} | ${r.title} | [${r.domain}](${r.url}) | ${truncate(r.snippet, 100)} |`,\n ).join('\\n')\n\n const serpTable = organic.length\n ? `## Organic Results (${organic.length})\\n| # | Title | URL | Snippet |\\n|---|-------|-----|----------|\\n${serpRows}`\n : '## Organic Results\\n*None found*'\n\n const localRows = localPack.map(b =>\n `| ${b.position} | ${b.name} | ${b.rating ?? '—'} (${b.reviewCount ?? '0'}) | ${b.websiteUrl ? `[link](${b.websiteUrl})` : '—'} |`,\n ).join('\\n')\n\n const localSection = localPack.length\n ? `\\n## Local Pack (${localPack.length})\\n| # | Name | Rating | Website |\\n|---|------|--------|---------|\\n${localRows}`\n : ''\n\n const aiSection = aiOvw?.detected && aiOvw.text\n ? `\\n## AI Overview\\n> ${truncate(aiOvw.text, 600)}`\n : ''\n\n const tips = `\\n---\\n💡 **Tips**\\n- Get PAA questions: use \\`harvest_paa\\` for this query\\n- Scrape any result: use \\`extract_url\\`\\n- Business entity IDs (CID/GCID/KG MID) shown above if found`\n\n const full = `# SERP Report: \"${input.query}\"${input.location ? ` · ${input.location}` : ''}\\n\\n${serpTable}${localSection}${entityIdsSection(entityIds)}${aiSection}${debugSection(diagnostics?.debug)}${tips}`\n\n const topO = organic.slice(0, 5).map(r => `${r.position}. [${r.title}](${r.url}) — ${r.domain}`).join('\\n')\n\n const summary = [\n `**SERP: \"${input.query}\"** — ${organic.length} organic results`,\n topO ? `\\n**Top results:**\\n${topO}` : '',\n localPack.length ? `\\n**Local Pack:** ${localPack.map(b => b.name).join(', ')}` : '',\n entityIdsSummaryLine(entityIds),\n `\\n💡 Use \\`harvest_paa\\` for questions · \\`extract_url\\` to scrape any result`,\n ].filter(Boolean).join('\\n')\n\n return oneBlock(full)\n}\n\ninterface Heading { level: number; text: string }\ninterface KpoResult {\n entityName?: string | null; type?: string[]; napScore?: number\n address?: string | null; phone?: string | null; email?: string | null\n sameAs?: string[]; missingFields?: string[]; faqCount?: number\n}\n\nexport function formatExtractUrl(raw: CallToolResult, input: { url: string }): CallToolResult {\n const parsed = parseData(raw)\n if ('error' in parsed) return { content: [{ type: 'text', text: parsed.error }], isError: true }\n const d = parsed.data\n\n const url = (d.url as string) ?? input.url\n const title = (d.title as string | null) ?? 'Untitled'\n const headings = (d.headings as Heading[]) ?? []\n const kpo = d.kpo as KpoResult | undefined\n const bodyMd = (d.bodyMarkdown as string | null) ?? ''\n const schema = d.schema as unknown[]\n const screenshotMeta = d.screenshot as { savedPath: string; sizeBytes: number; device: string } | null | undefined\n const branding = d.branding as { colorScheme: string | null; colors: Record<string, string | null>; fonts: Record<string, string | null>; assets: Record<string, string | null> } | null | undefined\n const media = d.media as { outputDir: string | null; assets: unknown[]; filteredCount: number; totalFound: number } | null | undefined\n\n const h1Lines = headings.filter(h => h.level === 1).map(h => `- ${h.text}`).join('\\n')\n const h2Lines = headings.filter(h => h.level === 2).map(h => ` - ${h.text}`).join('\\n')\n const headingSection = (h1Lines || h2Lines)\n ? `\\n## Heading Structure\\n${[h1Lines, h2Lines].filter(Boolean).join('\\n')}`\n : ''\n\n const kpoSection = kpo ? [\n `\\n## Entity / Schema`,\n kpo.entityName ? `- **Entity:** ${kpo.entityName}` : '',\n kpo.type?.length ? `- **@type:** ${kpo.type.join(', ')}` : '',\n kpo.napScore !== undefined ? `- **NAP Score:** ${kpo.napScore}/5` : '',\n kpo.address ? `- **Address:** ${kpo.address}` : '',\n kpo.phone ? `- **Phone:** ${kpo.phone}` : '',\n kpo.email ? `- **Email:** ${kpo.email}` : '',\n kpo.faqCount ? `- **FAQ items:** ${kpo.faqCount}` : '',\n kpo.sameAs?.length ? `- **sameAs:** ${kpo.sameAs.slice(0, 5).join(', ')}` : '',\n kpo.missingFields?.length ? `\\n**Missing schema fields:** ${kpo.missingFields.slice(0, 5).join(', ')}` : '',\n ].filter(Boolean).join('\\n') : ''\n\n const bodySection = bodyMd\n ? `\\n## Page Content\\n${bodyMd.slice(0, 3000)}${bodyMd.length > 3000 ? '\\n\\n*(truncated)*' : ''}`\n : ''\n\n const screenshotSection = screenshotMeta\n ? `\\n## Screenshot\\n- **File:** ${screenshotMeta.savedPath}\\n- **Size:** ${(screenshotMeta.sizeBytes / 1024).toFixed(1)} KB\\n- **Device:** ${screenshotMeta.device}`\n : ''\n\n const brandingSection = branding\n ? [\n `\\n## Branding`,\n branding.colorScheme ? `- **Color scheme:** ${branding.colorScheme}` : '',\n `- **Colors:**${Object.entries(branding.colors ?? {}).filter(([,v]) => v).map(([k,v]) => ` ${k}=${v}`).join(',') || ' (none extracted)'}`,\n `- **Fonts:**${Object.entries(branding.fonts ?? {}).filter(([,v]) => v).map(([k,v]) => ` ${k}=${v}`).join(',') || ' (none extracted)'}`,\n branding.assets?.logo ? `- **Logo:** ${branding.assets.logo}` : '',\n branding.assets?.favicon ? `- **Favicon:** ${branding.assets.favicon}` : '',\n ].filter(Boolean).join('\\n')\n : ''\n\n const mediaSection = media\n ? [\n `\\n## Media Assets`,\n `- **Found:** ${media.totalFound} total, ${media.filteredCount} filtered (ads/noise), ${media.assets.length} downloaded`,\n media.outputDir ? `- **Saved to:** ${media.outputDir}` : '',\n ].filter(Boolean).join('\\n')\n : ''\n\n const schemaCount = Array.isArray(schema) ? schema.length : 0\n const tips = `\\n---\\n💡 **Tips**\\n- Crawl entire site: use \\`extract_site\\`\\n- Map all URLs: use \\`map_site_urls\\`\\n- ${schemaCount} JSON-LD schema block(s) detected`\n\n const full = `# URL Extract: ${url}\\n**${title}**\\n${headingSection}${kpoSection}${brandingSection}${bodySection}${screenshotSection}${mediaSection}${tips}`\n\n const textResult = oneBlock(full)\n\n if (screenshotMeta?.savedPath) {\n try {\n const imgBuf = readFileSync(screenshotMeta.savedPath)\n return {\n content: [\n ...(textResult.content),\n { type: 'image', data: imgBuf.toString('base64'), mimeType: 'image/png' },\n ],\n }\n } catch { /* file not readable — return text only */ }\n }\n\n return textResult\n}\n\ninterface DiscoveredUrl { url: string; status: number | null }\ninterface SpiderResult { startUrl: string; urls: DiscoveredUrl[]; totalFound: number; durationMs: number; truncated: boolean }\n\nexport function formatMapSiteUrls(raw: CallToolResult, input: { url: string }): CallToolResult {\n const parsed = parseData(raw)\n if ('error' in parsed) return { content: [{ type: 'text', text: parsed.error }], isError: true }\n const d = parsed.data as unknown as SpiderResult\n\n const urls = d.urls ?? []\n const ok = urls.filter(u => (u.status ?? 0) >= 200 && (u.status ?? 0) < 300)\n const broken = urls.filter(u => u.status !== null && u.status >= 400)\n const redirects = urls.filter(u => u.status !== null && u.status >= 300 && u.status < 400)\n\n const urlRows = urls.slice(0, 200).map((u, i) => `| ${i + 1} | ${u.url} | ${u.status ?? '—'} |`).join('\\n')\n\n const full = [\n `# URL Map: ${input.url}`,\n `**${d.totalFound} URLs** · ${(d.durationMs / 1000).toFixed(1)}s${d.truncated ? ' · *truncated*' : ''}`,\n `\\n## Summary\\n- ✅ 2xx: ${ok.length}\\n- 🔀 3xx: ${redirects.length}\\n- ❌ 4xx+: ${broken.length}`,\n `\\n## URL Inventory\\n| # | URL | Status |\\n|---|-----|--------|\\n${urlRows}`,\n broken.length ? `\\n## Broken URLs\\n${broken.map(u => `- ${u.url} (${u.status})`).join('\\n')}` : '',\n `\\n---\\n💡 **Tips**\\n- Extract content from all pages: use \\`extract_site\\`\\n- Scrape a single page: use \\`extract_url\\``,\n ].filter(Boolean).join('\\n')\n\n const summary = [\n `**URL Map: ${input.url}**`,\n `${d.totalFound} URLs — ${ok.length} OK · ${broken.length} broken · ${redirects.length} redirects`,\n broken.length ? `\\n**Broken URLs:** ${broken.slice(0, 3).map(u => u.url).join(', ')}` : '',\n `\\n💡 Use \\`extract_site\\` to extract content from all pages`,\n ].filter(Boolean).join('\\n')\n\n return oneBlock(full)\n}\n\ninterface SitePageResult { url: string; title?: string | null; kpo?: KpoResult; schema?: unknown[] }\ninterface ExtractSiteResult { pages: SitePageResult[]; durationMs?: number }\n\nexport function formatExtractSite(raw: CallToolResult, input: { url: string }): CallToolResult {\n const parsed = parseData(raw)\n if ('error' in parsed) return { content: [{ type: 'text', text: parsed.error }], isError: true }\n const d = parsed.data as unknown as ExtractSiteResult\n\n const pages = d.pages ?? []\n\n const pageRows = pages.map((p, i) => {\n const schemaInfo = p.kpo?.type?.join(', ') ?? (Array.isArray(p.schema) && p.schema.length ? `${p.schema.length} block(s)` : '—')\n return `| ${i + 1} | ${p.title ?? 'Untitled'} | ${p.url} | ${schemaInfo} |`\n }).join('\\n')\n\n const full = [\n `# Site Extract: ${input.url}`,\n `**${pages.length} pages** · ${(((d.durationMs ?? 0)) / 1000).toFixed(1)}s`,\n `\\n## Pages\\n| # | Title | URL | Schema |\\n|---|-------|-----|--------|\\n${pageRows}`,\n `\\n---\\n💡 **Tips**\\n- Map URLs first: use \\`map_site_urls\\`\\n- Inspect a single page: use \\`extract_url\\``,\n ].join('\\n')\n\n const summary = [\n `**Site Extract: ${input.url}** — ${pages.length} pages`,\n pages.slice(0, 5).map(p => `- ${p.title ?? p.url}`).join('\\n'),\n pages.length > 5 ? `- … and ${pages.length - 5} more` : '',\n `\\n💡 Use \\`extract_url\\` to inspect any individual page`,\n ].filter(Boolean).join('\\n')\n\n return oneBlock(full)\n}\n\ninterface YTVideo { videoId: string; title: string; channelName: string; views?: string | null; duration?: string | null; url: string }\ninterface YTHarvestResult { videos: YTVideo[]; channelMeta?: { title?: string; subscriberCount?: string | null } | null; stats: { durationMs: number } }\n\nexport function formatYoutubeHarvest(\n raw: CallToolResult,\n input: { mode: string; query?: string; channelHandle?: string },\n): CallToolResult {\n const parsed = parseData(raw)\n if ('error' in parsed) return { content: [{ type: 'text', text: parsed.error }], isError: true }\n const d = parsed.data as unknown as YTHarvestResult\n\n const videos = d.videos ?? []\n const label = input.mode === 'channel' ? (input.channelHandle ?? 'channel') : `\"${input.query ?? ''}\"`\n\n const videoRows = videos.map((v, i) =>\n `| ${i + 1} | ${truncate(v.title, 70)} | ${v.channelName} | ${v.views ?? '—'} | ${v.duration ?? '—'} | \\`${v.videoId}\\` |`,\n ).join('\\n')\n\n const channelSection = d.channelMeta\n ? `\\n## Channel\\n- **Name:** ${d.channelMeta.title ?? '—'}\\n- **Subscribers:** ${d.channelMeta.subscriberCount ?? '—'}`\n : ''\n\n const full = [\n `# YouTube Harvest: ${label}`,\n `**${videos.length} videos** · ${(d.stats.durationMs / 1000).toFixed(1)}s`,\n channelSection,\n `\\n## Videos\\n| # | Title | Channel | Views | Duration | Video ID |\\n|---|-------|---------|-------|----------|----------|\\n${videoRows}`,\n `\\n---\\n💡 **Tips**\\n- Transcribe a video: use \\`youtube_transcribe\\` with the \\`videoId\\` above\\n- Switch mode: \\`mode: \"channel\"\\` with \\`channelHandle\\` or \\`mode: \"search\"\\` with \\`query\\``,\n ].filter(Boolean).join('\\n')\n\n const top5 = videos.slice(0, 5).map((v, i) => `${i + 1}. ${v.title} (\\`${v.videoId}\\`)`).join('\\n')\n\n const summary = [\n `**YouTube: ${label}** — ${videos.length} videos`,\n `\\n**Top videos:**\\n${top5}`,\n `\\n💡 Transcribe any video: \\`youtube_transcribe\\` with its videoId`,\n ].join('\\n')\n\n return oneBlock(full)\n}\n\ninterface TranscriptChunk { timestamp: [number, number]; text: string }\ninterface TranscriptResult { text: string; chunks?: TranscriptChunk[]; durationMs?: number }\n\nexport function formatYoutubeTranscribe(raw: CallToolResult, input: { videoId: string }): CallToolResult {\n const parsed = parseData(raw)\n if ('error' in parsed) return { content: [{ type: 'text', text: parsed.error }], isError: true }\n const d = parsed.data as unknown as TranscriptResult\n\n const text = d.text ?? ''\n const chunks = d.chunks ?? []\n const durSec = d.durationMs ? (d.durationMs / 1000).toFixed(0) : '—'\n\n const chunkRows = chunks.slice(0, 50).map(c => {\n const sec = Number.isFinite(c.timestamp[0]) ? Math.floor(c.timestamp[0]) : 0\n const mm = String(Math.floor(sec / 60)).padStart(2, '0')\n const ss = String(sec % 60).padStart(2, '0')\n return `| ${mm}:${ss} | ${truncate(c.text, 120)} |`\n }).join('\\n')\n\n const full = [\n `# YouTube Transcript: \\`${input.videoId}\\``,\n `**Duration:** ${durSec}s · **${text.split(' ').length} words**`,\n `\\n## Full Transcript\\n${text}`,\n chunks.length ? `\\n## Timestamped Chunks\\n| Time | Text |\\n|------|------|\\n${chunkRows}` : '',\n `\\n---\\n💡 Harvest more from this channel: use \\`youtube_harvest\\` with \\`mode: \"channel\"\\``,\n ].filter(Boolean).join('\\n')\n\n const summary = [\n `**YouTube Transcript: \\`${input.videoId}\\`** — ${text.split(' ').length} words · ${durSec}s`,\n `\\n**Preview:**\\n> ${truncate(text, 300)}`,\n `\\n💡 Full transcript in artifact above`,\n ].join('\\n')\n\n return oneBlock(full)\n}\n\ninterface FbAd {\n libraryId?: string; status?: string; creativeType?: string\n headline?: string | null; primaryText?: string | null; cta?: string | null\n startDate?: string | null; videoUrl?: string | null; variations?: number\n}\ninterface FbPageResult {\n advertiserName?: string | null\n summary: { totalAds: number; activeCount: number; videoCount: number; imageCount: number }\n ads: FbAd[]\n}\n\nexport function formatFacebookPageIntel(\n raw: CallToolResult,\n input: { pageId?: string; libraryId?: string; query?: string },\n): CallToolResult {\n const parsed = parseData(raw)\n if ('error' in parsed) return { content: [{ type: 'text', text: parsed.error }], isError: true }\n const d = parsed.data as unknown as FbPageResult\n\n const advertiser = d.advertiserName ?? input.query ?? input.pageId ?? input.libraryId ?? 'Advertiser'\n const ads = d.ads ?? []\n const s = d.summary ?? { totalAds: 0, activeCount: 0, videoCount: 0, imageCount: 0 }\n\n const adBlocks = ads.map((ad, i) => [\n `### Ad ${i + 1}${ad.libraryId ? ` · \\`${ad.libraryId}\\`` : ''} — ${ad.status ?? '—'} · ${ad.creativeType ?? '—'} · ${ad.startDate ?? '—'}`,\n ad.headline ? `**Headline:** ${ad.headline}` : '',\n ad.primaryText ? `**Copy:** ${truncate(ad.primaryText, 200)}` : '',\n ad.cta ? `**CTA:** ${ad.cta}` : '',\n ad.videoUrl ? `**Video URL:** \\`${ad.videoUrl}\\`` : '',\n ad.variations ? `**Variations:** ${ad.variations}` : '',\n ].filter(Boolean).join('\\n')).join('\\n\\n---\\n\\n')\n\n const full = [\n `# Facebook Ad Intel: ${advertiser}`,\n `**${s.totalAds} ads** · ${s.activeCount} active · ${s.videoCount} video · ${s.imageCount} image`,\n `\\n${adBlocks}`,\n `\\n---\\n💡 **Tips**\\n- Transcribe video ads: use \\`facebook_ad_transcribe\\` with the \\`videoUrl\\` above\\n- Find other advertisers: use \\`facebook_ad_search\\``,\n ].filter(Boolean).join('\\n')\n\n const activeAds = ads.filter(a => a.status?.toLowerCase() === 'active').slice(0, 5)\n const adSummary = activeAds.map((a, i) => `${i + 1}. ${truncate(a.headline ?? a.primaryText, 80)} (${a.creativeType ?? '—'})`).join('\\n')\n const videoCount = ads.filter(a => a.videoUrl).length\n\n const summary = [\n `**Facebook Ads: ${advertiser}** — ${s.totalAds} ads (${s.activeCount} active)`,\n adSummary ? `\\n**Active ads:**\\n${adSummary}` : '',\n `**Creative mix:** ${s.videoCount} video · ${s.imageCount} image`,\n videoCount ? `\\n💡 ${videoCount} video ads — transcribe with \\`facebook_ad_transcribe\\` using the videoUrl` : '',\n ].filter(Boolean).join('\\n')\n\n return oneBlock(full)\n}\n\ninterface FbAdvertiserResult { name: string; adCount?: number; libraryId?: string }\ninterface FbSearchResult { results?: FbAdvertiserResult[]; advertisers?: FbAdvertiserResult[] }\n\nexport function formatFacebookAdSearch(raw: CallToolResult, input: { query: string }): CallToolResult {\n const parsed = parseData(raw)\n if ('error' in parsed) return { content: [{ type: 'text', text: parsed.error }], isError: true }\n const d = parsed.data as unknown as FbSearchResult\n\n const advertisers = d.results ?? d.advertisers ?? []\n\n const rows = advertisers.map((a, i) =>\n `| ${i + 1} | ${a.name} | ${a.adCount ?? '—'} | \\`${a.libraryId ?? '—'}\\` |`,\n ).join('\\n')\n\n const full = [\n `# Facebook Ad Library Search: \"${input.query}\"`,\n `**${advertisers.length} advertisers found**`,\n `\\n## Advertisers\\n| # | Name | Ad Count | Library ID |\\n|---|------|----------|------------|\\n${rows}`,\n `\\n---\\n💡 **Tips**\\n- Scan all ads: use \\`facebook_page_intel\\` with \\`libraryId\\`\\n- Or pass the advertiser name as \\`query\\` in \\`facebook_page_intel\\``,\n ].join('\\n')\n\n const summary = [\n `**Facebook Ad Search: \"${input.query}\"** — ${advertisers.length} advertisers`,\n advertisers.slice(0, 5).map((a, i) =>\n `${i + 1}. ${a.name}${a.adCount ? ` (${a.adCount} ads)` : ''} — \\`${a.libraryId ?? '—'}\\``,\n ).join('\\n'),\n `\\n💡 Scan ads with \\`facebook_page_intel\\` using \\`libraryId\\``,\n ].filter(Boolean).join('\\n')\n\n return oneBlock(full)\n}\n\ninterface MapsReviewCard { author: string | null; stars: string | null; date: string | null; text: string | null }\ntype ReviewsStatus = 'collected' | 'none_exist' | 'unavailable' | 'not_requested'\ninterface MapsHistogramEntry { stars: number; count: string }\ninterface MapsTopicEntry { label: string; count: string }\ninterface MapsAboutEntry { section: string; attribute: string }\ninterface CreditCostEntry { key: string; label: string; credits: number; unit: string; notes?: string }\ninterface CreditLedgerEntry { amount_mc: number; operation: string; description: string | null; created_at: string }\n\nexport function formatCreditsInfo(raw: CallToolResult, input: { item?: string; includeLedger?: boolean }): CallToolResult {\n const parsed = parseData(raw)\n if ('error' in parsed) return { content: [{ type: 'text', text: parsed.error }], isError: true }\n const d = parsed.data as Record<string, unknown>\n\n const balance = d.balance_credits as number | undefined\n const costs = (d.costs as CreditCostEntry[] | undefined) ?? []\n const matched = d.matched_cost as CreditCostEntry | null\n const ledger = (d.ledger as CreditLedgerEntry[] | undefined) ?? []\n\n const costRows = costs.map(c => {\n const notes = c.notes ? ` ${c.notes}` : ''\n return `| ${c.label} | ${c.credits} | ${c.unit}${notes} |`\n }).join('\\n')\n\n const ledgerRows = ledger.map(row => {\n const credits = row.amount_mc / 1000\n return `| ${row.created_at} | ${row.operation} | ${credits} | ${row.description ?? ''} |`\n }).join('\\n')\n\n const matchedSection = matched\n ? `\\n## Matched Cost\\n**${matched.label}:** ${matched.credits} credits ${matched.unit}${matched.notes ? `\\n\\n${matched.notes}` : ''}`\n : input.item\n ? `\\n## Matched Cost\\nNo exact cost match found for \"${input.item}\". See the full cost table below.`\n : ''\n\n const full = [\n `# Credits`,\n `**Balance:** ${balance ?? 'unknown'} credits`,\n matchedSection,\n costs.length ? `\\n## Cost Table\\n| Item | Credits | Unit |\\n|------|---------|------|\\n${costRows}` : '',\n ledger.length ? `\\n## Recent Ledger\\n| Date | Operation | Credits | Description |\\n|------|-----------|---------|-------------|\\n${ledgerRows}` : '',\n ].filter(Boolean).join('\\n')\n\n const summary = [\n `**Credit balance:** ${balance ?? 'unknown'} credits`,\n matched ? `\\n**${matched.label}:** ${matched.credits} credits ${matched.unit}` : null,\n input.includeLedger && ledger.length ? `\\nRecent ledger entries included in the full report.` : null,\n ].filter(Boolean).join('\\n')\n\n return oneBlock(full)\n}\n\nexport function formatMapsPlaceIntel(\n raw: CallToolResult,\n input: { businessName: string; location: string; includeReviews?: boolean },\n): CallToolResult {\n const parsed = parseData(raw)\n if ('error' in parsed) return { content: [{ type: 'text', text: parsed.error }], isError: true }\n const d = parsed.data as Record<string, unknown>\n\n const name = (d.name as string | null) ?? input.businessName\n const rating = d.rating as string | null\n const reviewCount = d.reviewCount as string | null\n const category = d.category as string | null\n const address = d.address as string | null\n const phone = d.phoneDisplay as string | null\n const website = d.website as string | null\n const hoursSummary = d.hoursSummary as string | null\n const plusCode = d.plusCode as string | null\n const bookingUrl = d.bookingUrl as string | null\n const kgmid = d.kgmid as string | null\n const cidDecimal = d.cidDecimal as string | null\n const cidUrl = d.cidUrl as string | null\n const lat = d.lat as number | null\n const lng = d.lng as number | null\n const durationMs = d.durationMs as number | null\n\n const histogram = (d.reviewHistogram as MapsHistogramEntry[]) ?? []\n const topics = (d.reviewTopics as MapsTopicEntry[]) ?? []\n const about = (d.aboutAttributes as MapsAboutEntry[]) ?? []\n const reviews = (d.reviews as MapsReviewCard[]) ?? []\n const reviewsStatus = (d.reviewsStatus as ReviewsStatus | undefined) ?? 'not_requested'\n\n const hoursTable = (d.hoursTable as Array<{ day: string; hours: string }>) ?? []\n\n const ratingLine = [rating, reviewCount ? `(${reviewCount} reviews)` : null].filter(Boolean).join(' ')\n\n const basicLines = [\n address ? `- **Address:** ${address}` : null,\n phone ? `- **Phone:** ${phone}` : null,\n website ? `- **Website:** ${website}` : null,\n hoursSummary ? `- **Hours:** ${hoursSummary}` : null,\n plusCode ? `- **Plus Code:** ${plusCode}` : null,\n bookingUrl ? `- **Book:** ${bookingUrl}` : null,\n ].filter(Boolean).join('\\n')\n\n const hoursSection = hoursTable.length\n ? `\\n## Hours\\n| Day | Hours |\\n|-----|-------|\\n${hoursTable.map(r => `| ${r.day} | ${r.hours} |`).join('\\n')}`\n : ''\n\n const histSection = histogram.length\n ? `\\n## Rating Distribution\\n| Stars | Count |\\n|-------|-------|\\n${histogram.map(r => `| ${'★'.repeat(r.stars)}${'☆'.repeat(5 - r.stars)} | ${r.count} |`).join('\\n')}`\n : ''\n\n const topicsSection = topics.length\n ? `\\n## Review Topics\\n${topics.map(t => `- **${t.label}:** ${t.count} mentions`).join('\\n')}`\n : ''\n\n const aboutBySection: Record<string, string[]> = {}\n for (const a of about) {\n if (!aboutBySection[a.section]) aboutBySection[a.section] = []\n aboutBySection[a.section].push(a.attribute)\n }\n const aboutSection = Object.keys(aboutBySection).length\n ? `\\n## About\\n${Object.entries(aboutBySection).map(([s, attrs]) => `**${s}**\\n${attrs.map(a => `- ${a}`).join('\\n')}`).join('\\n\\n')}`\n : ''\n\n const entitySection = [\n kgmid ? `- **KGMID:** \\`${kgmid}\\`` : null,\n cidDecimal ? `- **CID:** \\`${cidDecimal}\\`` : null,\n cidUrl ? `- **Maps CID URL:** ${cidUrl}` : null,\n lat != null && lng != null ? `- **Coordinates:** ${lat}, ${lng}` : null,\n ].filter(Boolean).join('\\n')\n\n const reviewsSection = (() => {\n if (reviewsStatus === 'not_requested') return ''\n if (reviewsStatus === 'unavailable') return '\\n## Reviews\\n> Reviews could not be retrieved this run — retry with `includeReviews: true`.'\n if (reviewsStatus === 'none_exist') return '\\n## Reviews\\n*This business has no reviews on Google Maps.*'\n if (reviews.length === 0) return '\\n## Reviews\\n*0 reviews collected.*'\n return `\\n## Reviews (${reviews.length})\\n${reviews.map((r, i) => {\n const starsN = parseInt(r.stars ?? '0')\n const stars = '★'.repeat(starsN) + '☆'.repeat(5 - starsN)\n return `### ${i + 1}. ${r.author ?? 'Anonymous'} — ${stars}\\n*${r.date ?? ''}*\\n\\n${r.text ?? ''}`\n }).join('\\n\\n')}`\n })()\n\n const full = [\n `# ${name}`,\n category ? `*${category}*` : null,\n ratingLine ? `\\n**Rating:** ${ratingLine}` : null,\n basicLines ? `\\n${basicLines}` : null,\n hoursSection,\n histSection,\n topicsSection,\n aboutSection,\n entitySection ? `\\n## Entity IDs\\n${entitySection}` : null,\n reviewsSection,\n durationMs != null ? `\\n---\\n*Extracted in ${(durationMs / 1000).toFixed(1)}s*` : null,\n ].filter(Boolean).join('\\n')\n\n const summary = [\n `**${name}** — ${category ?? 'Business'} · ${ratingLine || 'No rating'}`,\n address ? `📍 ${address}` : null,\n phone ? `📞 ${phone}` : null,\n hoursSummary ? `🕐 ${hoursSummary}` : null,\n website ? `🌐 ${website}` : null,\n reviewsStatus === 'collected' && reviews.length ? `\\n💬 ${reviews.length} reviews fetched — full list in artifact above` : null,\n reviewsStatus === 'unavailable' ? `\\n⚠️ Reviews could not be retrieved this run` : null,\n reviewsStatus === 'none_exist' ? `\\n💬 No reviews on Google Maps` : null,\n ].filter(Boolean).join('\\n')\n\n return oneBlock(full)\n}\n\nexport function formatFacebookAdTranscribe(raw: CallToolResult, input: { videoUrl: string }): CallToolResult {\n const parsed = parseData(raw)\n if ('error' in parsed) return { content: [{ type: 'text', text: parsed.error }], isError: true }\n const d = parsed.data as unknown as TranscriptResult\n\n const text = d.text ?? ''\n const chunks = d.chunks ?? []\n const durSec = d.durationMs ? (d.durationMs / 1000).toFixed(0) : '—'\n\n const chunkRows = chunks.slice(0, 50).map(c => {\n const sec = Number.isFinite(c.timestamp[0]) ? Math.floor(c.timestamp[0]) : 0\n const mm = String(Math.floor(sec / 60)).padStart(2, '0')\n const ss = String(sec % 60).padStart(2, '0')\n return `| ${mm}:${ss} | ${truncate(c.text, 120)} |`\n }).join('\\n')\n\n const full = [\n `# Facebook Ad Transcript`,\n `**Duration:** ${durSec}s · **${text.split(' ').length} words**`,\n `\\n## Full Transcript\\n${text}`,\n chunks.length ? `\\n## Timestamped Chunks\\n| Time | Text |\\n|------|------|\\n${chunkRows}` : '',\n `\\n---\\n💡 Get more ads from this advertiser: use \\`facebook_page_intel\\``,\n ].filter(Boolean).join('\\n')\n\n const summary = [\n `**Facebook Ad Transcript** — ${text.split(' ').length} words · ${durSec}s`,\n `\\n**Preview:**\\n> ${truncate(text, 300)}`,\n `\\n💡 Full transcript in artifact above`,\n ].join('\\n')\n\n return oneBlock(full)\n}\n","import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js'\nimport type { IMcpToolExecutor } from './IMcpToolExecutor.js'\nimport type {\n HarvestPaaInput,\n SearchSerpInput,\n ExtractUrlInput,\n MapSiteUrlsInput,\n ExtractSiteInput,\n YoutubeHarvestInput,\n YoutubeTranscribeInput,\n FacebookPageIntelInput,\n FacebookAdSearchInput,\n FacebookAdTranscribeInput,\n MapsPlaceIntelInput,\n CreditsInfoInput,\n CaptureSerpSnapshotInput,\n CaptureSerpPageSnapshotsInput,\n} from './mcp-tool-schemas.js'\n\nexport class HttpMcpToolExecutor implements IMcpToolExecutor {\n private readonly baseUrl: string\n private readonly apiKey: string\n private readonly timeoutMs: number\n private readonly serpIntelligenceTimeoutMs: number\n\n constructor(baseUrl: string, apiKey: string) {\n this.baseUrl = baseUrl.replace(/\\/$/, '')\n this.apiKey = apiKey\n const configuredTimeoutMs = Number(process.env.MCP_SCRAPER_HTTP_TIMEOUT_MS ?? 110_000)\n this.timeoutMs = Number.isFinite(configuredTimeoutMs) && configuredTimeoutMs > 0 ? configuredTimeoutMs : 110_000\n const configuredSerpIntelligenceTimeoutMs = Number(process.env.MCP_SCRAPER_SERP_INTELLIGENCE_HTTP_TIMEOUT_MS ?? this.timeoutMs)\n this.serpIntelligenceTimeoutMs = Number.isFinite(configuredSerpIntelligenceTimeoutMs) && configuredSerpIntelligenceTimeoutMs > 0\n ? configuredSerpIntelligenceTimeoutMs\n : this.timeoutMs\n }\n\n private async call(path: string, body: Record<string, unknown>, timeoutMs = this.timeoutMs): Promise<CallToolResult> {\n try {\n const res = await fetch(`${this.baseUrl}${path}`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'x-api-key': this.apiKey,\n },\n body: JSON.stringify(body),\n signal: AbortSignal.timeout(timeoutMs),\n })\n const data = await res.json()\n if (!res.ok) {\n return { content: [{ type: 'text', text: JSON.stringify(data) }], isError: true }\n }\n return { content: [{ type: 'text', text: JSON.stringify(data) }] }\n } catch (err) {\n const msg = err instanceof Error ? err.message : String(err)\n if (err instanceof DOMException && err.name === 'TimeoutError') {\n return {\n content: [{\n type: 'text',\n text: JSON.stringify({\n error: 'mcp_request_timeout',\n error_type: 'timeout',\n retryable: true,\n path,\n timeoutMs,\n message: `MCP Scraper request exceeded ${Math.round(timeoutMs / 1000)}s and was cancelled. Retry with fewer results or use the async API for deep harvests.`,\n }),\n }],\n isError: true,\n }\n }\n return { content: [{ type: 'text', text: msg }], isError: true }\n }\n }\n\n harvestPaa(input: HarvestPaaInput): Promise<CallToolResult> {\n return this.call('/harvest/sync', input as Record<string, unknown>)\n }\n\n searchSerp(input: SearchSerpInput): Promise<CallToolResult> {\n return this.call('/harvest/sync', { ...input, serpOnly: true } as Record<string, unknown>)\n }\n\n extractUrl(input: ExtractUrlInput): Promise<CallToolResult> {\n return this.call('/extract-url', input as Record<string, unknown>)\n }\n\n mapSiteUrls(input: MapSiteUrlsInput): Promise<CallToolResult> {\n return this.call('/map-urls', input as Record<string, unknown>)\n }\n\n extractSite(input: ExtractSiteInput): Promise<CallToolResult> {\n return this.call('/extract-site', input as Record<string, unknown>)\n }\n\n youtubeHarvest(input: YoutubeHarvestInput): Promise<CallToolResult> {\n return this.call('/youtube/harvest', input as Record<string, unknown>)\n }\n\n youtubeTranscribe(input: YoutubeTranscribeInput): Promise<CallToolResult> {\n return this.call('/youtube/transcribe', input as Record<string, unknown>)\n }\n\n facebookPageIntel(input: FacebookPageIntelInput): Promise<CallToolResult> {\n return this.call('/facebook/page-intel', input as Record<string, unknown>)\n }\n\n facebookAdSearch(input: FacebookAdSearchInput): Promise<CallToolResult> {\n return this.call('/facebook/search', input as Record<string, unknown>)\n }\n\n facebookAdTranscribe(input: FacebookAdTranscribeInput): Promise<CallToolResult> {\n return this.call('/facebook/transcribe', input as Record<string, unknown>)\n }\n\n mapsPlaceIntel(input: MapsPlaceIntelInput): Promise<CallToolResult> {\n return this.call('/maps/place', input as Record<string, unknown>)\n }\n\n creditsInfo(input: CreditsInfoInput): Promise<CallToolResult> {\n return this.call('/billing/credits', input as Record<string, unknown>)\n }\n\n captureSerpSnapshot(input: CaptureSerpSnapshotInput): Promise<CallToolResult> {\n return this.call('/serp-intelligence/capture', input as Record<string, unknown>, this.serpIntelligenceTimeoutMs)\n }\n\n captureSerpPageSnapshots(input: CaptureSerpPageSnapshotsInput): Promise<CallToolResult> {\n return this.call('/serp-intelligence/page-snapshots', input as Record<string, unknown>, this.serpIntelligenceTimeoutMs)\n }\n\n}\n"],"mappings":";AAAA,SAAS,iBAAiB;;;ACA1B,SAAS,SAAS;AAEX,IAAM,wBAAwB;AAAA,EACnC,OAAc,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,SAAS,o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