mcp-scraper 0.19.0 → 0.20.0

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.
Files changed (51) hide show
  1. package/dist/bin/api-server.cjs +189 -37
  2. package/dist/bin/api-server.cjs.map +1 -1
  3. package/dist/bin/api-server.js +3 -3
  4. package/dist/bin/mcp-scraper-cli.cjs +1 -1
  5. package/dist/bin/mcp-scraper-cli.cjs.map +1 -1
  6. package/dist/bin/mcp-scraper-cli.js +1 -1
  7. package/dist/bin/mcp-scraper-install.cjs +1 -1
  8. package/dist/bin/mcp-scraper-install.cjs.map +1 -1
  9. package/dist/bin/mcp-scraper-install.js +1 -1
  10. package/dist/bin/mcp-stdio-server.cjs +100 -14
  11. package/dist/bin/mcp-stdio-server.cjs.map +1 -1
  12. package/dist/bin/mcp-stdio-server.js +4 -4
  13. package/dist/bin/paa-harvest.cjs.map +1 -1
  14. package/dist/bin/paa-harvest.js +3 -3
  15. package/dist/{chunk-GL4BW4CP.js → chunk-22VEGGTW.js} +21 -9
  16. package/dist/{chunk-GL4BW4CP.js.map → chunk-22VEGGTW.js.map} +1 -1
  17. package/dist/{chunk-RUGJE5EB.js → chunk-EJK25QOW.js} +2 -2
  18. package/dist/chunk-JWIE5NCR.js +284 -0
  19. package/dist/chunk-JWIE5NCR.js.map +1 -0
  20. package/dist/{chunk-O2S5TOCG.js → chunk-KE7KE2Q2.js} +102 -16
  21. package/dist/chunk-KE7KE2Q2.js.map +1 -0
  22. package/dist/chunk-PZB3TJWK.js +7 -0
  23. package/dist/chunk-PZB3TJWK.js.map +1 -0
  24. package/dist/{chunk-D7ZT27HY.js → chunk-UN7VMHZL.js} +2 -2
  25. package/dist/{chunk-2HDMYW4B.js → chunk-XDFSLSSH.js} +2 -2
  26. package/dist/{chunk-HE2LQPJ2.js → chunk-ZRKFW5FB.js} +2 -2
  27. package/dist/{db-LIOTIWVN.js → db-YHZYG7D2.js} +2 -2
  28. package/dist/{extract-bundle-U4D5LW5W.js → extract-bundle-OSUPAHCE.js} +58 -5
  29. package/dist/extract-bundle-OSUPAHCE.js.map +1 -0
  30. package/dist/index.cjs.map +1 -1
  31. package/dist/index.js +3 -3
  32. package/dist/{server-VWXDE64Y.js → server-VDWIPV7F.js} +37 -310
  33. package/dist/server-VDWIPV7F.js.map +1 -0
  34. package/dist/{site-extract-repository-NVSZH35Y.js → site-extract-repository-GWKGK46Z.js} +3 -3
  35. package/dist/{worker-AM2DHUWG.js → worker-O5PZTTPY.js} +5 -5
  36. package/docs/mcp-tool-manifest.generated.json +166 -23
  37. package/docs/specs/meta-ad-creative-media-resolution-spec.md +3 -3
  38. package/docs/specs/unified-credit-and-scheduled-execution-billing-spec.md +1007 -0
  39. package/package.json +1 -1
  40. package/dist/chunk-O2S5TOCG.js.map +0 -1
  41. package/dist/chunk-OQHYDW4Q.js +0 -7
  42. package/dist/chunk-OQHYDW4Q.js.map +0 -1
  43. package/dist/extract-bundle-U4D5LW5W.js.map +0 -1
  44. package/dist/server-VWXDE64Y.js.map +0 -1
  45. /package/dist/{chunk-RUGJE5EB.js.map → chunk-EJK25QOW.js.map} +0 -0
  46. /package/dist/{chunk-D7ZT27HY.js.map → chunk-UN7VMHZL.js.map} +0 -0
  47. /package/dist/{chunk-2HDMYW4B.js.map → chunk-XDFSLSSH.js.map} +0 -0
  48. /package/dist/{chunk-HE2LQPJ2.js.map → chunk-ZRKFW5FB.js.map} +0 -0
  49. /package/dist/{db-LIOTIWVN.js.map → db-YHZYG7D2.js.map} +0 -0
  50. /package/dist/{site-extract-repository-NVSZH35Y.js.map → site-extract-repository-GWKGK46Z.js.map} +0 -0
  51. /package/dist/{worker-AM2DHUWG.js.map → worker-O5PZTTPY.js.map} +0 -0
@@ -11,7 +11,7 @@ import "../chunk-K443GQY5.js";
11
11
  import "../chunk-XGIPATLV.js";
12
12
  import {
13
13
  PACKAGE_VERSION
14
- } from "../chunk-OQHYDW4Q.js";
14
+ } from "../chunk-PZB3TJWK.js";
15
15
 
16
16
  // src/cli/human-cli.ts
17
17
  import { Command } from "commander";
@@ -106,7 +106,7 @@ function renderInstallTerminal(options) {
106
106
  }
107
107
 
108
108
  // src/version.ts
109
- var PACKAGE_VERSION = "0.19.0";
109
+ var PACKAGE_VERSION = "0.20.0";
110
110
 
111
111
  // bin/mcp-scraper-install.ts
112
112
  var noColor = process.argv.includes("--no-color") || process.env.NO_COLOR !== void 0 || process.env.FORCE_COLOR === "0" || !process.stdout.isTTY;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/install-terminal.ts","../../src/version.ts","../../bin/mcp-scraper-install.ts"],"sourcesContent":["export interface InstallTerminalOptions {\n color?: boolean\n version: string\n apiKeyConfigured?: boolean\n}\n\ntype Tone = 'cyan' | 'lime' | 'amber' | 'red' | 'muted' | 'bold'\n\nconst CODES: Record<Tone | 'reset', string> = {\n reset: '\\x1b[0m',\n cyan: '\\x1b[36m',\n lime: '\\x1b[32m',\n amber: '\\x1b[33m',\n red: '\\x1b[31m',\n muted: '\\x1b[90m',\n bold: '\\x1b[1m',\n}\n\nfunction colorize(value: string, tone: Tone, enabled: boolean): string {\n if (!enabled) return value\n return `${CODES[tone]}${value}${CODES.reset}`\n}\n\nfunction toolRow(label: string, tools: string[], enabled: boolean): string {\n const padded = label.padEnd(9, ' ')\n return ` ${colorize(padded, 'muted', enabled)} ${tools.join(colorize(' . ', 'muted', enabled))}`\n}\n\nexport function renderInstallTerminal(options: InstallTerminalOptions): string {\n const color = options.color ?? true\n const apiKeyValue = options.apiKeyConfigured ? '$MCP_SCRAPER_API_KEY' : 'sk_live_your_key'\n const ascii = String.raw`\n __ __ ____ ____ \n| \\/ |/ ___| _ \\\n| |\\/| | | | |_) |\n| | | | |___| __/\n|_| |_|\\____|_|\n\n ____ ____ ____ _ ____ _____ ____\n/ ___| / ___| _ \\ / \\ | _ \\| ____| _ \\\n\\___ \\| | | |_) | / _ \\ | |_) | _| | |_) |\n ___) | |___| _ < / ___ \\| __/| |___| _ <\n|____/ \\____|_| \\_\\/_/ \\_\\_| |_____|_| \\_\\\n`\n\n const claudeCommand = [\n `MCP_SCRAPER_API_KEY=${apiKeyValue} npx -y -p mcp-scraper@latest \\\\`,\n ' mcp-scraper-cli agent install claude --apply',\n ].join('\\n')\n\n const codexConfig = [\n '[mcp_servers.mcp-scraper]',\n 'command = \"npx\"',\n 'args = [\"-y\", \"-p\", \"mcp-scraper@latest\", \"mcp-scraper\"]',\n `env = { MCP_SCRAPER_API_KEY = \"${apiKeyValue}\" }`,\n ].join('\\n')\n\n return [\n colorize(`mcp-scraper v${options.version}`, 'bold', color),\n colorize('> mcp-scraper-install', 'muted', color),\n colorize(ascii, 'amber', color),\n `${colorize('MCP Scraper Agent', 'cyan', color)} . v${options.version} . mcpscraper.dev`,\n '1/1 install surfaces ready',\n colorize('Newest: any approved connection read can become an indexed Memory snapshot in one call. OAuth stays tenant-isolated and provider content is redacted and marked untrusted.', 'lime', color),\n '',\n `${colorize('Tools', 'cyan', color)} ${colorize('(158 MCP tools)', 'muted', color)}`,\n toolRow('search', ['harvest_paa', 'search_serp', 'maps_search', 'maps_place_intel'], color),\n toolRow('extract', ['extract_url', 'map_site_urls', 'extract_site', 'audit_site', 'directory_workflow'], color),\n toolRow('build', ['rank_tracker_workflow', 'cron plan', 'database prompt'], color),\n toolRow('media', ['youtube_harvest', 'youtube_transcribe', 'facebook_ad_search', 'facebook_page_intel', 'facebook_ad_transcribe', 'facebook_video_transcribe', 'instagram_profile_content', 'instagram_media_download', 'reddit_thread'], color),\n toolRow('browser', ['browser_open', 'browser_profile_connect', 'browser_profile_list', 'browser_close', 'browser_screenshot', 'browser_read', 'browser_locate', 'browser_replay_mark', 'browser_replay_annotate'], color),\n toolRow('connect', ['list_service_connections', 'describe_service_connection_tool', 'import_service_connection_to_memory', 'export_connected_service_data', 'renew_connected_data_download', 'read_service_connection', 'call_service_connection_action'], color),\n toolRow('account', ['credits_info', 'reports', 'MCP resources'], color),\n toolRow('memory', ['memory-put', 'memory-get', 'memory-search', 'list-vaults', 'record-fact', 'list-scheduled-actions'], color),\n `${colorize('Workflows', 'cyan', color)} ${colorize('(MCP + CLI + API)', 'muted', color)}`,\n toolRow('route', ['workflow_list', 'workflow_suggest', 'workflow_run', 'workflow_step', 'workflow_status', 'workflow_artifact_read'], color),\n toolRow('seo', ['directory', 'agent-packet', 'competitive audit', 'map/serp comparison', 'PAA/AIO briefs', 'scheduled runs'], color),\n '',\n colorize('Usage tips:', 'amber', color),\n 'Run mcp-scraper-install for this visible card. Run mcp-scraper-cli for setup utilities and subcommands.',\n 'Run mcp-scraper in a human terminal to print this card; MCP clients get the same command as a silent stdio server.',\n 'Explicit card command: npx -y -p mcp-scraper@latest mcp-scraper-install',\n 'Hosted browser sessions use direct/no-proxy egress by default.',\n 'Customer auth setup: run browser_profile_connect, send the watch_url, let the user sign in, then call browser_profile_list until AUTHENTICATED.',\n 'Connected account ranges: call export_connected_service_data once. It handles Gmail, Calendar, Zoom, and Resend pagination; do not loop read_service_connection over individual records.',\n 'Connected account RAG: call import_service_connection_to_memory for one bounded approved read. It writes a redacted, untrusted snapshot to a stable Memory path and embeds it for search.',\n 'Stack logins / reconnect: run browser_profile_connect again with the same profile name and another domain to add accounts or refresh a login.',\n 'Start with workflow_suggest for broad jobs like market analysis, ICP research, CRO audits, brand briefs, content gaps, and AI visibility.',\n 'For MCP clients, use mcp-scraper so one install can mix SERP, Maps, browser, reports, and saved MCP resources.',\n 'If you hit the concurrency limit, add an extra slot for $5/month with mcp-scraper-cli billing concurrency checkout.',\n '',\n `${colorize('Ready.', 'lime', color)} Install the combined MCP server with one command:`,\n '',\n colorize('Setup doctor', 'amber', color),\n 'npx -y -p mcp-scraper@latest mcp-scraper-cli doctor',\n '',\n colorize('Hosted profile setup', 'amber', color),\n 'In your MCP client, call browser_profile_connect with email=\"seo@example.com\" and domain=\"chatgpt.com\".',\n 'Give the returned watch_url to the user. After they sign in, call browser_profile_list, then browser_open with the returned profile. Add more logins by calling browser_profile_connect again with the same profile and a new domain.',\n '',\n colorize('Claude Code one-command setup', 'amber', color),\n claudeCommand,\n 'Then fully exit Claude Code and open a new Claude terminal. Check with: claude mcp list',\n '',\n colorize('Codex config', 'amber', color),\n codexConfig,\n '',\n colorize('Claude Desktop Extension', 'amber', color),\n 'Download: https://mcpscraper.dev/downloads/mcp-scraper.mcpb',\n '',\n colorize('Safety note:', 'muted', color),\n 'mcp-scraper prints this card only when stdin/stdout are an interactive TTY. In MCP clients it writes only JSON-RPC to stdout.',\n 'Use --stdio or MCP_SCRAPER_FORCE_STDIO=1 to force server mode from a terminal.',\n '',\n ].join('\\n')\n}\n","export const PACKAGE_VERSION = '0.19.0'\n","#!/usr/bin/env node\nimport { renderInstallTerminal } from '../src/install-terminal.js'\nimport { PACKAGE_VERSION } from '../src/version.js'\n\nconst noColor =\n process.argv.includes('--no-color') ||\n process.env.NO_COLOR !== undefined ||\n process.env.FORCE_COLOR === '0' ||\n !process.stdout.isTTY\n\nconst help = process.argv.includes('--help') || process.argv.includes('-h')\nif (help) {\n process.stdout.write([\n 'Usage: mcp-scraper-install [--no-color]',\n '',\n 'Prints the branded MCP Scraper terminal install card and copyable install commands.',\n 'mcp-scraper prints the same card in a human terminal and runs as the MCP stdio server in clients.',\n '',\n ].join('\\n'))\n process.exit(0)\n}\n\nprocess.stdout.write(renderInstallTerminal({\n version: PACKAGE_VERSION,\n color: !noColor,\n apiKeyConfigured: Boolean(process.env.MCP_SCRAPER_API_KEY?.trim()),\n}))\n"],"mappings":";;;;AAQA,IAAM,QAAwC;AAAA,EAC5C,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,KAAK;AAAA,EACL,OAAO;AAAA,EACP,MAAM;AACR;AAEA,SAAS,SAAS,OAAe,MAAY,SAA0B;AACrE,MAAI,CAAC,QAAS,QAAO;AACrB,SAAO,GAAG,MAAM,IAAI,CAAC,GAAG,KAAK,GAAG,MAAM,KAAK;AAC7C;AAEA,SAAS,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K;AAAA,IACnD;AAAA,IACA;AAAA,IACA,SAAS,gBAAgB,SAAS,KAAK;AAAA,IACvC;AAAA,IACA;AAAA,IACA;AAAA,EACF,EAAE,KAAK,IAAI;AACb;;;ACnHO,IAAM,kBAAkB;;;ACI/B,IAAM,UACJ,QAAQ,KAAK,SAAS,YAAY,KAClC,QAAQ,IAAI,aAAa,UACzB,QAAQ,IAAI,gBAAgB,OAC5B,CAAC,QAAQ,OAAO;AAElB,IAAM,OAAO,QAAQ,KAAK,SAAS,QAAQ,KAAK,QAAQ,KAAK,SAAS,IAAI;AAC1E,IAAI,MAAM;AACR,UAAQ,OAAO,MAAM;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,EAAE,KAAK,IAAI,CAAC;AACZ,UAAQ,KAAK,CAAC;AAChB;AAEA,QAAQ,OAAO,MAAM,sBAAsB;AAAA,EACzC,SAAS;AAAA,EACT,OAAO,CAAC;AAAA,EACR,kBAAkB,QAAQ,QAAQ,IAAI,qBAAqB,KAAK,CAAC;AACnE,CAAC,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../src/install-terminal.ts","../../src/version.ts","../../bin/mcp-scraper-install.ts"],"sourcesContent":["export interface InstallTerminalOptions {\n color?: boolean\n version: string\n apiKeyConfigured?: boolean\n}\n\ntype Tone = 'cyan' | 'lime' | 'amber' | 'red' | 'muted' | 'bold'\n\nconst CODES: Record<Tone | 'reset', string> = {\n reset: '\\x1b[0m',\n cyan: '\\x1b[36m',\n lime: '\\x1b[32m',\n amber: '\\x1b[33m',\n red: '\\x1b[31m',\n muted: '\\x1b[90m',\n bold: '\\x1b[1m',\n}\n\nfunction colorize(value: string, tone: Tone, enabled: boolean): string {\n if (!enabled) return value\n return `${CODES[tone]}${value}${CODES.reset}`\n}\n\nfunction toolRow(label: string, tools: string[], enabled: boolean): string {\n const padded = label.padEnd(9, ' ')\n return ` ${colorize(padded, 'muted', enabled)} ${tools.join(colorize(' . ', 'muted', enabled))}`\n}\n\nexport function renderInstallTerminal(options: InstallTerminalOptions): string {\n const color = options.color ?? true\n const apiKeyValue = options.apiKeyConfigured ? '$MCP_SCRAPER_API_KEY' : 'sk_live_your_key'\n const ascii = String.raw`\n __ __ ____ ____ \n| \\/ |/ ___| _ \\\n| |\\/| | | | |_) |\n| | | | |___| __/\n|_| |_|\\____|_|\n\n ____ ____ ____ _ ____ _____ ____\n/ ___| / ___| _ \\ / \\ | _ \\| ____| _ \\\n\\___ \\| | | |_) | / _ \\ | |_) | _| | |_) |\n ___) | |___| _ < / ___ \\| __/| |___| _ <\n|____/ \\____|_| \\_\\/_/ \\_\\_| |_____|_| \\_\\\n`\n\n const claudeCommand = [\n `MCP_SCRAPER_API_KEY=${apiKeyValue} npx -y -p mcp-scraper@latest \\\\`,\n ' mcp-scraper-cli agent install claude --apply',\n ].join('\\n')\n\n const codexConfig = [\n '[mcp_servers.mcp-scraper]',\n 'command = \"npx\"',\n 'args = [\"-y\", \"-p\", \"mcp-scraper@latest\", \"mcp-scraper\"]',\n `env = { MCP_SCRAPER_API_KEY = \"${apiKeyValue}\" }`,\n ].join('\\n')\n\n return [\n colorize(`mcp-scraper v${options.version}`, 'bold', color),\n colorize('> mcp-scraper-install', 'muted', color),\n colorize(ascii, 'amber', color),\n `${colorize('MCP Scraper Agent', 'cyan', color)} . v${options.version} . mcpscraper.dev`,\n '1/1 install surfaces ready',\n colorize('Newest: any approved connection read can become an indexed Memory snapshot in one call. OAuth stays tenant-isolated and provider content is redacted and marked untrusted.', 'lime', color),\n '',\n `${colorize('Tools', 'cyan', color)} ${colorize('(158 MCP tools)', 'muted', color)}`,\n toolRow('search', ['harvest_paa', 'search_serp', 'maps_search', 'maps_place_intel'], color),\n toolRow('extract', ['extract_url', 'map_site_urls', 'extract_site', 'audit_site', 'directory_workflow'], color),\n toolRow('build', ['rank_tracker_workflow', 'cron plan', 'database prompt'], color),\n toolRow('media', ['youtube_harvest', 'youtube_transcribe', 'facebook_ad_search', 'facebook_page_intel', 'facebook_ad_transcribe', 'facebook_video_transcribe', 'instagram_profile_content', 'instagram_media_download', 'reddit_thread'], color),\n toolRow('browser', ['browser_open', 'browser_profile_connect', 'browser_profile_list', 'browser_close', 'browser_screenshot', 'browser_read', 'browser_locate', 'browser_replay_mark', 'browser_replay_annotate'], color),\n toolRow('connect', ['list_service_connections', 'describe_service_connection_tool', 'import_service_connection_to_memory', 'export_connected_service_data', 'renew_connected_data_download', 'read_service_connection', 'call_service_connection_action'], color),\n toolRow('account', ['credits_info', 'reports', 'MCP resources'], color),\n toolRow('memory', ['memory-put', 'memory-get', 'memory-search', 'list-vaults', 'record-fact', 'list-scheduled-actions'], color),\n `${colorize('Workflows', 'cyan', color)} ${colorize('(MCP + CLI + API)', 'muted', color)}`,\n toolRow('route', ['workflow_list', 'workflow_suggest', 'workflow_run', 'workflow_step', 'workflow_status', 'workflow_artifact_read'], color),\n toolRow('seo', ['directory', 'agent-packet', 'competitive audit', 'map/serp comparison', 'PAA/AIO briefs', 'scheduled runs'], color),\n '',\n colorize('Usage tips:', 'amber', color),\n 'Run mcp-scraper-install for this visible card. Run mcp-scraper-cli for setup utilities and subcommands.',\n 'Run mcp-scraper in a human terminal to print this card; MCP clients get the same command as a silent stdio server.',\n 'Explicit card command: npx -y -p mcp-scraper@latest mcp-scraper-install',\n 'Hosted browser sessions use direct/no-proxy egress by default.',\n 'Customer auth setup: run browser_profile_connect, send the watch_url, let the user sign in, then call browser_profile_list until AUTHENTICATED.',\n 'Connected account ranges: call export_connected_service_data once. It handles Gmail, Calendar, Zoom, and Resend pagination; do not loop read_service_connection over individual records.',\n 'Connected account RAG: call import_service_connection_to_memory for one bounded approved read. It writes a redacted, untrusted snapshot to a stable Memory path and embeds it for search.',\n 'Stack logins / reconnect: run browser_profile_connect again with the same profile name and another domain to add accounts or refresh a login.',\n 'Start with workflow_suggest for broad jobs like market analysis, ICP research, CRO audits, brand briefs, content gaps, and AI visibility.',\n 'For MCP clients, use mcp-scraper so one install can mix SERP, Maps, browser, reports, and saved MCP resources.',\n 'If you hit the concurrency limit, add an extra slot for $5/month with mcp-scraper-cli billing concurrency checkout.',\n '',\n `${colorize('Ready.', 'lime', color)} Install the combined MCP server with one command:`,\n '',\n colorize('Setup doctor', 'amber', color),\n 'npx -y -p mcp-scraper@latest mcp-scraper-cli doctor',\n '',\n colorize('Hosted profile setup', 'amber', color),\n 'In your MCP client, call browser_profile_connect with email=\"seo@example.com\" and domain=\"chatgpt.com\".',\n 'Give the returned watch_url to the user. After they sign in, call browser_profile_list, then browser_open with the returned profile. Add more logins by calling browser_profile_connect again with the same profile and a new domain.',\n '',\n colorize('Claude Code one-command setup', 'amber', color),\n claudeCommand,\n 'Then fully exit Claude Code and open a new Claude terminal. Check with: claude mcp list',\n '',\n colorize('Codex config', 'amber', color),\n codexConfig,\n '',\n colorize('Claude Desktop Extension', 'amber', color),\n 'Download: https://mcpscraper.dev/downloads/mcp-scraper.mcpb',\n '',\n colorize('Safety note:', 'muted', color),\n 'mcp-scraper prints this card only when stdin/stdout are an interactive TTY. In MCP clients it writes only JSON-RPC to stdout.',\n 'Use --stdio or MCP_SCRAPER_FORCE_STDIO=1 to force server mode from a terminal.',\n '',\n ].join('\\n')\n}\n","export const PACKAGE_VERSION = '0.20.0'\n","#!/usr/bin/env node\nimport { renderInstallTerminal } from '../src/install-terminal.js'\nimport { PACKAGE_VERSION } from '../src/version.js'\n\nconst noColor =\n process.argv.includes('--no-color') ||\n process.env.NO_COLOR !== undefined ||\n process.env.FORCE_COLOR === '0' ||\n !process.stdout.isTTY\n\nconst help = process.argv.includes('--help') || process.argv.includes('-h')\nif (help) {\n process.stdout.write([\n 'Usage: mcp-scraper-install [--no-color]',\n '',\n 'Prints the branded MCP Scraper terminal install card and copyable install commands.',\n 'mcp-scraper prints the same card in a human terminal and runs as the MCP stdio server in clients.',\n '',\n ].join('\\n'))\n process.exit(0)\n}\n\nprocess.stdout.write(renderInstallTerminal({\n version: PACKAGE_VERSION,\n color: !noColor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  var noColor = process.argv.includes("--no-color") || process.env.NO_COLOR !== void 0 || process.env.FORCE_COLOR === "0" || !process.stdout.isTTY;
@@ -241,6 +241,9 @@ var HttpMcpToolExecutor = class {
241
241
  auditSite(input) {
242
242
  return this.call("/extract-site", input);
243
243
  }
244
+ checkSiteExport(input) {
245
+ return this.getJson(`/extract-site/status/${encodeURIComponent(input.jobId)}`);
246
+ }
244
247
  youtubeHarvest(input) {
245
248
  return this.call("/youtube/harvest", input);
246
249
  }
@@ -525,7 +528,7 @@ render();
525
528
  }
526
529
 
527
530
  // src/version.ts
528
- var PACKAGE_VERSION = "0.19.0";
531
+ var PACKAGE_VERSION = "0.20.0";
529
532
 
530
533
  // src/mcp/browser-agent-tool-schemas.ts
531
534
  var import_zod = require("zod");
@@ -3801,9 +3804,24 @@ function buildSeoExport(siteUrl, pages, branding) {
3801
3804
  branding: branding ?? void 0
3802
3805
  };
3803
3806
  }
3807
+ function formatBackgroundJobStarted(toolLabel, data) {
3808
+ if (data.status !== "pending" || typeof data.jobId !== "string") return null;
3809
+ const jobId = data.jobId;
3810
+ const full = [
3811
+ `# ${toolLabel} \u2014 export started`,
3812
+ `**Job ID:** \`${jobId}\``,
3813
+ `
3814
+ Running in the background \u2014 this can take a while for large sites.`,
3815
+ `
3816
+ Poll \`check_site_export\` with this jobId to get the download link once it's ready.`
3817
+ ].join("\n");
3818
+ return { content: [{ type: "text", text: full }], structuredContent: { jobId, status: "pending" } };
3819
+ }
3804
3820
  async function formatExtractSite(raw, input, ctx) {
3805
3821
  const parsed = parseData(raw);
3806
3822
  if ("error" in parsed) return { content: [{ type: "text", text: parsed.error }], isError: true };
3823
+ const started = formatBackgroundJobStarted("Multi-Page Site Content Crawl", parsed.data);
3824
+ if (started) return started;
3807
3825
  const d = parsed.data;
3808
3826
  const pages = d.pages ?? [];
3809
3827
  const schemaTypesOf = (p) => p.kpo?.type ?? (Array.isArray(p.schema) && p.schema.length ? [`${p.schema.length} block(s)`] : []);
@@ -3921,6 +3939,8 @@ ${pageDetails}${tips}`;
3921
3939
  async function formatAuditSite(raw, input, ctx) {
3922
3940
  const parsed = parseData(raw);
3923
3941
  if ("error" in parsed) return { content: [{ type: "text", text: parsed.error }], isError: true };
3942
+ const started = formatBackgroundJobStarted("Technical SEO Audit", parsed.data);
3943
+ if (started) return started;
3924
3944
  const d = parsed.data;
3925
3945
  const pages = d.pages ?? [];
3926
3946
  const schemaTypesOf = (p) => p.kpo?.type ?? (Array.isArray(p.schema) && p.schema.length ? [`${p.schema.length} block(s)`] : []);
@@ -3992,6 +4012,42 @@ ${imgLine}`
3992
4012
  ].join("\n");
3993
4013
  return { content: [{ type: "text", text: full }], structuredContent };
3994
4014
  }
4015
+ function formatCheckSiteExport(raw, input) {
4016
+ const parsed = parseData(raw);
4017
+ if ("error" in parsed) return { content: [{ type: "text", text: parsed.error }], isError: true };
4018
+ const d = parsed.data;
4019
+ const bundle = (d.artifacts ?? []).find((a) => a.key.endsWith("bundle.zip")) ?? null;
4020
+ const progress = d.totalUrls ? `${d.doneUrls ?? 0}/${d.totalUrls} pages` : "starting";
4021
+ const body = d.status === "complete" && bundle ? `
4022
+ ## \u2705 Ready
4023
+ **Download:** ${bundle.url}
4024
+ **Size:** ${(bundle.bytes / 1e6).toFixed(1)} MB` : d.status === "complete" ? `
4025
+ ## \u26A0\uFE0F Complete, but no bundle was produced
4026
+ Check the job's artifacts \u2014 nothing matched \`bundle.zip\`.` : d.status === "failed" ? `
4027
+ ## \u274C Failed
4028
+ ${d.error ?? "no error message recorded"}` : `
4029
+ ## \u23F3 Not ready yet
4030
+ Status: ${d.status} (${progress}). Poll again shortly.`;
4031
+ const full = [
4032
+ `# Site Export: ${d.startUrl ?? input.jobId}`,
4033
+ `**Job ID:** \`${d.jobId}\``,
4034
+ `**Status:** ${d.status}`,
4035
+ body
4036
+ ].join("\n");
4037
+ return {
4038
+ ...oneBlock(full),
4039
+ structuredContent: {
4040
+ jobId: d.jobId,
4041
+ status: d.status,
4042
+ startUrl: d.startUrl,
4043
+ totalUrls: d.totalUrls,
4044
+ doneUrls: d.doneUrls,
4045
+ bundleUrl: bundle?.url ?? null,
4046
+ bundleBytes: bundle?.bytes ?? null,
4047
+ error: d.error ?? null
4048
+ }
4049
+ };
4050
+ }
3995
4051
  function formatYoutubeHarvest(raw, input) {
3996
4052
  const parsed = parseData(raw);
3997
4053
  if ("error" in parsed) return { content: [{ type: "text", text: parsed.error }], isError: true };
@@ -5959,13 +6015,20 @@ var ExtractSiteInputSchema = {
5959
6015
  maxPages: import_zod4.z.number().int().min(1).max(1e4).optional().describe("Maximum pages to extract. Bulk crawls (over 25 pages) switch to folder mode: each page saved as its own Markdown file, with a summary plus folder path returned instead of inlining content."),
5960
6016
  rotateProxies: import_zod4.z.boolean().optional().describe("Route page fetches through rotating residential proxies to defeat rate-limiting and bot blocks (403/429). Slower and pricier \u2014 use only when a site blocks normal crawling."),
5961
6017
  rotateProxyEvery: import_zod4.z.number().int().min(1).max(100).optional().describe("When rotateProxies is on, pages fetched per proxy before rotating. Default 30."),
5962
- formats: import_zod4.z.array(import_zod4.z.enum(["markdown", "links", "json", "images", "branding"])).optional().describe("Per-page output formats: markdown, links, json, images are captured cheaply from HTML; branding (site-level logo/colors/fonts) requires a browser and adds time. Defaults to markdown+links.")
6018
+ formats: import_zod4.z.array(import_zod4.z.enum(["markdown", "links", "json", "images", "branding"])).optional().describe("Per-page output formats: markdown, links, json, images are captured cheaply from HTML; branding (site-level logo/colors/fonts) requires a browser and adds time. Defaults to markdown+links."),
6019
+ background: import_zod4.z.boolean().default(false).describe("Run the crawl as a background job instead of blocking this call, returning a jobId immediately \u2014 poll it with check_site_export to get a downloadable zip (all page content, plus real image files if downloadImages is set) once ready. Use for large sites where a synchronous call would be slow."),
6020
+ downloadImages: import_zod4.z.boolean().default(false).describe("Download every discovered image as a real file into the export bundle (not just image URLs/stats). OFF by default \u2014 must be explicitly set true. Implies background regardless of the background flag, since downloading a whole site's images is too slow to run synchronously. Capped at 20 images/page and 500 images/site.")
5963
6021
  };
5964
6022
  var AuditSiteInputSchema = {
5965
6023
  url: import_zod4.z.string().url().describe("Public website URL or domain for a full technical SEO audit (issues, link graph, indexability, headings, images). For plain content use extract_site instead."),
5966
6024
  maxPages: import_zod4.z.number().int().min(1).max(1e4).optional().describe("Maximum pages to crawl and audit. Always writes a folder of analysis files plus per-page content, returning a summary plus the folder path."),
5967
6025
  rotateProxies: import_zod4.z.boolean().optional().describe("Route page fetches through rotating residential proxies to defeat rate-limiting and bot blocks. Slower/pricier \u2014 use only when a site blocks normal crawling."),
5968
- rotateProxyEvery: import_zod4.z.number().int().min(1).max(100).optional().describe("When rotateProxies is on, pages fetched per proxy before rotating. Default 30.")
6026
+ rotateProxyEvery: import_zod4.z.number().int().min(1).max(100).optional().describe("When rotateProxies is on, pages fetched per proxy before rotating. Default 30."),
6027
+ background: import_zod4.z.boolean().default(false).describe("Run the audit as a background job instead of blocking this call, returning a jobId immediately \u2014 poll it with check_site_export to get a downloadable zip (full audit report, all page content, plus real image files if downloadImages is set) once ready. Use for large sites where a synchronous call would be slow."),
6028
+ downloadImages: import_zod4.z.boolean().default(false).describe("Download every discovered image as a real file into the export bundle (not just image URLs/stats). OFF by default \u2014 must be explicitly set true. Implies background regardless of the background flag, since downloading a whole site's images is too slow to run synchronously. Capped at 20 images/page and 500 images/site.")
6029
+ };
6030
+ var CheckSiteExportInputSchema = {
6031
+ jobId: import_zod4.z.string().min(1).describe('The jobId returned by extract_site or audit_site when called with background (or downloadImages) set \u2014 poll this until status is "complete" (or "failed").')
5969
6032
  };
5970
6033
  var YoutubeHarvestInputSchema = {
5971
6034
  mode: import_zod4.z.enum(["search", "channel"]).describe("Use search for topic/keyword requests. Use channel when the user provides @handle, channel ID, or channel URL."),
@@ -6368,36 +6431,52 @@ var DiffPageOutputSchema = {
6368
6431
  };
6369
6432
  var ExtractSiteOutputSchema = {
6370
6433
  url: import_zod4.z.string(),
6371
- pageCount: import_zod4.z.number().int().min(0),
6434
+ pageCount: import_zod4.z.number().int().min(0).optional().describe("Absent when background is true \u2014 the crawl has not finished yet."),
6372
6435
  pages: import_zod4.z.array(import_zod4.z.object({
6373
6436
  url: import_zod4.z.string(),
6374
6437
  title: NullableString2,
6375
6438
  schemaTypes: import_zod4.z.array(import_zod4.z.string())
6376
- })),
6377
- durationMs: import_zod4.z.number().min(0),
6439
+ })).optional().describe("Absent when background is true \u2014 the crawl has not finished yet."),
6440
+ durationMs: import_zod4.z.number().min(0).optional().describe("Absent when background is true \u2014 the crawl has not finished yet."),
6378
6441
  truncatedCount: import_zod4.z.number().int().min(0).optional(),
6379
- artifact: ArtifactPointerOutputSchema.optional()
6442
+ artifact: ArtifactPointerOutputSchema.optional(),
6443
+ jobId: import_zod4.z.string().optional().describe("Present when background (or downloadImages) was set \u2014 poll with check_site_export."),
6444
+ status: import_zod4.z.enum(["pending"]).optional().describe("Present when background (or downloadImages) was set."),
6445
+ statusUrl: import_zod4.z.string().optional().describe("Present when background (or downloadImages) was set \u2014 informational; use check_site_export with jobId, not this URL directly.")
6380
6446
  };
6381
6447
  var AuditSiteOutputSchema = {
6382
6448
  url: import_zod4.z.string(),
6383
- pageCount: import_zod4.z.number().int().min(0),
6384
- durationMs: import_zod4.z.number().min(0),
6385
- bulkFolder: import_zod4.z.string().nullable(),
6386
- issues: import_zod4.z.record(import_zod4.z.string(), import_zod4.z.number()),
6449
+ pageCount: import_zod4.z.number().int().min(0).optional().describe("Absent when background is true \u2014 the audit has not finished yet."),
6450
+ durationMs: import_zod4.z.number().min(0).optional().describe("Absent when background is true \u2014 the audit has not finished yet."),
6451
+ bulkFolder: import_zod4.z.string().nullable().optional().describe("Absent when background is true \u2014 the audit has not finished yet."),
6452
+ issues: import_zod4.z.record(import_zod4.z.string(), import_zod4.z.number()).optional().describe("Absent when background is true \u2014 the audit has not finished yet."),
6387
6453
  images: import_zod4.z.object({
6388
6454
  unique: import_zod4.z.number().int().min(0),
6389
6455
  totalBytes: import_zod4.z.number().min(0),
6390
6456
  over100kb: import_zod4.z.number().int().min(0),
6391
6457
  legacyFormat: import_zod4.z.number().int().min(0)
6392
- }),
6458
+ }).optional().describe("Absent when background is true \u2014 the audit has not finished yet."),
6393
6459
  links: import_zod4.z.object({
6394
6460
  internal: import_zod4.z.number().int().min(0),
6395
6461
  external: import_zod4.z.number().int().min(0),
6396
6462
  orphans: import_zod4.z.number().int().min(0),
6397
6463
  brokenInternal: import_zod4.z.number().int().min(0),
6398
6464
  externalDomains: import_zod4.z.number().int().min(0)
6399
- }),
6400
- artifact: ArtifactPointerOutputSchema.optional()
6465
+ }).optional().describe("Absent when background is true \u2014 the audit has not finished yet."),
6466
+ artifact: ArtifactPointerOutputSchema.optional(),
6467
+ jobId: import_zod4.z.string().optional().describe("Present when background (or downloadImages) was set \u2014 poll with check_site_export."),
6468
+ status: import_zod4.z.enum(["pending"]).optional().describe("Present when background (or downloadImages) was set."),
6469
+ statusUrl: import_zod4.z.string().optional().describe("Present when background (or downloadImages) was set \u2014 informational; use check_site_export with jobId, not this URL directly.")
6470
+ };
6471
+ var CheckSiteExportOutputSchema = {
6472
+ jobId: import_zod4.z.string(),
6473
+ status: import_zod4.z.enum(["pending", "running", "complete", "failed"]),
6474
+ startUrl: import_zod4.z.string().optional(),
6475
+ totalUrls: import_zod4.z.number().int().min(0).optional(),
6476
+ doneUrls: import_zod4.z.number().int().min(0).optional(),
6477
+ bundleUrl: import_zod4.z.string().nullable().describe("Downloadable zip URL once status is complete; null otherwise."),
6478
+ bundleBytes: import_zod4.z.number().int().min(0).nullable().describe("Zip size in bytes once status is complete; null otherwise."),
6479
+ error: import_zod4.z.string().nullable().optional().describe("Present with a message when status is failed.")
6401
6480
  };
6402
6481
  var MapsPlaceIntelOutputSchema = {
6403
6482
  name: import_zod4.z.string(),
@@ -7693,6 +7772,13 @@ function registerPaaExtractorMcpTools(server2, executor, options = {}) {
7693
7772
  outputSchema: recordOutputSchema("audit_site", AuditSiteOutputSchema),
7694
7773
  annotations: liveWebToolAnnotations("Technical SEO Audit")
7695
7774
  }, async (input) => formatAuditSite(await executor.auditSite(input), input, ctx));
7775
+ server2.registerTool("check_site_export", {
7776
+ title: "Check Site Export",
7777
+ description: "Poll the status of a background extract_site or audit_site job (one started with background or downloadImages set). Returns a downloadable zip URL (all page content, plus real image files if downloadImages was set) once status is complete.",
7778
+ inputSchema: CheckSiteExportInputSchema,
7779
+ outputSchema: recordOutputSchema("check_site_export", CheckSiteExportOutputSchema),
7780
+ annotations: liveWebToolAnnotations("Check Site Export")
7781
+ }, async (input) => formatCheckSiteExport(await executor.checkSiteExport(input), input));
7696
7782
  server2.registerTool("youtube_harvest", {
7697
7783
  title: "YouTube Video Harvest",
7698
7784
  description: 'Harvest YouTube video metadata by topic search or channel library. Use mode "search" for keyword/topic requests, mode "channel" for @handles/channel IDs/URLs. Returns titles, views, durations, and videoIds.',