mcp-scraper 0.49.0 → 0.51.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 (59) hide show
  1. package/README.md +11 -3
  2. package/dist/{analytics-repository-WWXVU3VW.js → analytics-repository-IKE53S3E.js} +10 -2
  3. package/dist/bin/api-server.cjs +840 -177
  4. package/dist/bin/api-server.cjs.map +1 -1
  5. package/dist/bin/api-server.js +4 -4
  6. package/dist/bin/mcp-scraper-cli.cjs +1 -1
  7. package/dist/bin/mcp-scraper-cli.cjs.map +1 -1
  8. package/dist/bin/mcp-scraper-cli.js +1 -1
  9. package/dist/bin/mcp-scraper-install.cjs +1 -1
  10. package/dist/bin/mcp-scraper-install.cjs.map +1 -1
  11. package/dist/bin/mcp-scraper-install.js +1 -1
  12. package/dist/bin/mcp-stdio-server.cjs +141 -35
  13. package/dist/bin/mcp-stdio-server.cjs.map +1 -1
  14. package/dist/bin/mcp-stdio-server.js +4 -4
  15. package/dist/bin/paa-harvest.cjs.map +1 -1
  16. package/dist/bin/paa-harvest.js +3 -3
  17. package/dist/{chunk-MFNGUM4L.js → chunk-2XTYLJQK.js} +15 -1
  18. package/dist/chunk-2XTYLJQK.js.map +1 -0
  19. package/dist/{chunk-YW2LXLDU.js → chunk-5BEPOFKG.js} +160 -15
  20. package/dist/chunk-5BEPOFKG.js.map +1 -0
  21. package/dist/chunk-73MUQSWC.js +7 -0
  22. package/dist/chunk-73MUQSWC.js.map +1 -0
  23. package/dist/{chunk-MFE6RMIA.js → chunk-GOZIG6HD.js} +2 -2
  24. package/dist/{chunk-R66PJOZW.js → chunk-NNZXZTJ2.js} +2 -2
  25. package/dist/{chunk-64WBUDPC.js → chunk-O63VVCCE.js} +143 -37
  26. package/dist/chunk-O63VVCCE.js.map +1 -0
  27. package/dist/{chunk-6DPIE262.js → chunk-QHVFKFME.js} +2 -2
  28. package/dist/{chunk-PODASLGT.js → chunk-QXAY44SA.js} +2 -2
  29. package/dist/{chunk-ZEMHL36J.js → chunk-YMSZO62N.js} +2 -2
  30. package/dist/{db-A4YUPV4Z.js → db-UPSS5BGM.js} +2 -2
  31. package/dist/editorial-reading-room/assets/app.js +62 -0
  32. package/dist/editorial-reading-room/assets/index.html +8 -0
  33. package/dist/editorial-reading-room/assets/styles.css +39 -0
  34. package/dist/{extract-bundle-2HONVC5T.js → extract-bundle-RCTNANCH.js} +3 -3
  35. package/dist/index.cjs.map +1 -1
  36. package/dist/index.js +3 -3
  37. package/dist/{location-data-repository-YWFJGNIP.js → location-data-repository-UUSHH5M2.js} +3 -3
  38. package/dist/{server-JE7SLZLJ.js → server-IGIIEHXY.js} +518 -135
  39. package/dist/server-IGIIEHXY.js.map +1 -0
  40. package/dist/{site-extract-repository-STNOI5OH.js → site-extract-repository-3VQAALNR.js} +3 -3
  41. package/dist/{worker-4MHZS3OB.js → worker-KQN673JF.js} +5 -5
  42. package/package.json +1 -1
  43. package/dist/chunk-64WBUDPC.js.map +0 -1
  44. package/dist/chunk-MFNGUM4L.js.map +0 -1
  45. package/dist/chunk-XLEDHV3J.js +0 -7
  46. package/dist/chunk-XLEDHV3J.js.map +0 -1
  47. package/dist/chunk-YW2LXLDU.js.map +0 -1
  48. package/dist/server-JE7SLZLJ.js.map +0 -1
  49. /package/dist/{analytics-repository-WWXVU3VW.js.map → analytics-repository-IKE53S3E.js.map} +0 -0
  50. /package/dist/{chunk-MFE6RMIA.js.map → chunk-GOZIG6HD.js.map} +0 -0
  51. /package/dist/{chunk-R66PJOZW.js.map → chunk-NNZXZTJ2.js.map} +0 -0
  52. /package/dist/{chunk-6DPIE262.js.map → chunk-QHVFKFME.js.map} +0 -0
  53. /package/dist/{chunk-PODASLGT.js.map → chunk-QXAY44SA.js.map} +0 -0
  54. /package/dist/{chunk-ZEMHL36J.js.map → chunk-YMSZO62N.js.map} +0 -0
  55. /package/dist/{db-A4YUPV4Z.js.map → db-UPSS5BGM.js.map} +0 -0
  56. /package/dist/{extract-bundle-2HONVC5T.js.map → extract-bundle-RCTNANCH.js.map} +0 -0
  57. /package/dist/{location-data-repository-YWFJGNIP.js.map → location-data-repository-UUSHH5M2.js.map} +0 -0
  58. /package/dist/{site-extract-repository-STNOI5OH.js.map → site-extract-repository-3VQAALNR.js.map} +0 -0
  59. /package/dist/{worker-4MHZS3OB.js.map → worker-KQN673JF.js.map} +0 -0
@@ -11,7 +11,7 @@ import "../chunk-G3P3ZDB4.js";
11
11
  import "../chunk-3ZUBQQPQ.js";
12
12
  import {
13
13
  PACKAGE_VERSION
14
- } from "../chunk-XLEDHV3J.js";
14
+ } from "../chunk-73MUQSWC.js";
15
15
 
16
16
  // src/cli/human-cli.ts
17
17
  import { Command } from "commander";
@@ -107,7 +107,7 @@ function renderInstallTerminal(options) {
107
107
  }
108
108
 
109
109
  // src/version.ts
110
- var PACKAGE_VERSION = "0.49.0";
110
+ var PACKAGE_VERSION = "0.51.0";
111
111
 
112
112
  // bin/mcp-scraper-install.ts
113
113
  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('(246 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', ['create_editorial_reading_room', 'rank_tracker_workflow', 'portable HTML'], 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('commons', ['commons_search_entities', 'commons_get_entity_linkset', 'commons_prepare_entity', 'commons_submit_entity', 'commons_prepare_publication', 'commons_claim_publication', 'commons_publish_editorial', 'commons_get_publication'], 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.49.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,QAAQ,OAAe,OAAiB,SAA0B;AACzE,QAAM,SAAS,MAAM,OAAO,GAAG,GAAG;AAClC,SAAO,KAAK,SAAS,QAAQ,SAAS,OAAO,CAAC,IAAI,MAAM,KAAK,SAAS,SAAS,SAAS,OAAO,CAAC,CAAC;AACnG;AAEO,SAAS,sBAAsB,SAAyC;AAC7E,QAAM,QAAQ,QAAQ,SAAS;AAC/B,QAAM,cAAc,QAAQ,mBAAmB,yBAAyB;AACxE,QAAM,QAAQ,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcrB,QAAM,gBAAgB;AAAA,IACpB,uBAAuB,WAAW;AAAA,IAClC;AAAA,EACF,EAAE,KAAK,IAAI;AAEX,QAAM,cAAc;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,IACA,kCAAkC,WAAW;AAAA,EAC/C,EAAE,KAAK,IAAI;AAEX,SAAO;AAAA,IACL,SAAS,gBAAgB,QAAQ,OAAO,IAAI,QAAQ,KAAK;AAAA,IACzD,SAAS,yBAAyB,SAAS,KAAK;AAAA,IAChD,SAAS,OAA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AAA,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('(246 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', ['create_editorial_reading_room', 'rank_tracker_workflow', 'portable HTML'], 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('commons', ['commons_search_entities', 'commons_get_entity_linkset', 'commons_prepare_entity', 'commons_submit_entity', 'commons_prepare_publication', 'commons_claim_publication', 'commons_publish_editorial', 'commons_get_publication'], 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.51.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,QAAQ,OAAe,OAAiB,SAA0B;AACzE,QAAM,SAAS,MAAM,OAAO,GAAG,GAAG;AAClC,SAAO,KAAK,SAA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S,4BAA4B,SAAS,KAAK;AAAA,IACnD;AAAA,IACA;AAAA,IACA,SAAS,gBAAgB,SAAS,KAAK;AAAA,IACvC;AAAA,IACA;AAAA,IACA;AAAA,EACF,EAAE,KAAK,IAAI;AACb;;;ACpHO,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":[]}
@@ -4,7 +4,7 @@ import {
4
4
  } from "../chunk-QH63IZTX.js";
5
5
  import {
6
6
  PACKAGE_VERSION
7
- } from "../chunk-XLEDHV3J.js";
7
+ } from "../chunk-73MUQSWC.js";
8
8
 
9
9
  // bin/mcp-scraper-install.ts
10
10
  var noColor = process.argv.includes("--no-color") || process.env.NO_COLOR !== void 0 || process.env.FORCE_COLOR === "0" || !process.stdout.isTTY;
@@ -35,6 +35,7 @@ var import_node_crypto = require("crypto");
35
35
 
36
36
  // src/harvest-timeout.ts
37
37
  var VERCEL_FUNCTION_MAX_MS = 3e5;
38
+ var DEFAULT_TOOL_CLIENT_TIMEOUT_MS = 3e5;
38
39
  var CLIENT_OVER_SERVER_MARGIN_MS = 15e3;
39
40
  function harvestTimeoutBudget(maxQuestions, serpOnly = false) {
40
41
  const requested = Number.isFinite(maxQuestions) && maxQuestions > 0 ? Math.trunc(maxQuestions) : 30;
@@ -175,6 +176,29 @@ function sanitizeOutboundDiagnostics(value, parentKey = "") {
175
176
  }
176
177
 
177
178
  // src/mcp/http-mcp-tool-executor.ts
179
+ function unclassifiedTransportFailure(path, err) {
180
+ const name = err instanceof Error ? err.name : typeof err;
181
+ const detail = err instanceof Error ? err.message : String(err);
182
+ console.error(JSON.stringify({
183
+ event: "mcp_executor_transport_failed",
184
+ path,
185
+ error_name: name,
186
+ error_message: sanitizeVendorName(detail).slice(0, 400)
187
+ }));
188
+ return {
189
+ content: [{
190
+ type: "text",
191
+ text: JSON.stringify({
192
+ error: "service_unavailable",
193
+ error_type: name,
194
+ retryable: true,
195
+ path,
196
+ message: publicErrorMessage("service_unavailable")
197
+ })
198
+ }],
199
+ isError: true
200
+ };
201
+ }
178
202
  function youtubeVideoIdFromUrl(url) {
179
203
  if (!url) return null;
180
204
  try {
@@ -275,7 +299,7 @@ var HttpMcpToolExecutor = class {
275
299
  const rawOverride = process.env.MCP_SCRAPER_HTTP_TIMEOUT_MS;
276
300
  const parsedOverride = rawOverride === void 0 ? NaN : Number(rawOverride);
277
301
  this.httpTimeoutOverrideMs = Number.isFinite(parsedOverride) && parsedOverride > 0 ? parsedOverride : null;
278
- this.timeoutMs = this.httpTimeoutOverrideMs ?? 11e4;
302
+ this.timeoutMs = this.httpTimeoutOverrideMs ?? DEFAULT_TOOL_CLIENT_TIMEOUT_MS;
279
303
  const configuredSerpIntelligenceTimeoutMs = Number(process.env.MCP_SCRAPER_SERP_INTELLIGENCE_HTTP_TIMEOUT_MS ?? this.timeoutMs);
280
304
  this.serpIntelligenceTimeoutMs = Number.isFinite(configuredSerpIntelligenceTimeoutMs) && configuredSerpIntelligenceTimeoutMs > 0 ? configuredSerpIntelligenceTimeoutMs : this.timeoutMs;
281
305
  }
@@ -314,7 +338,7 @@ var HttpMcpToolExecutor = class {
314
338
  isError: true
315
339
  };
316
340
  }
317
- return { content: [{ type: "text", text: publicErrorMessage("service_unavailable") }], isError: true };
341
+ return unclassifiedTransportFailure(path, err);
318
342
  }
319
343
  }
320
344
  async callConnectedMutation(path, body, idempotencyKey, timeoutMs = this.timeoutMs) {
@@ -348,8 +372,8 @@ var HttpMcpToolExecutor = class {
348
372
  return { content: [{ type: "text", text: JSON.stringify(httpErrorPayload(path, res, data)) }], isError: true };
349
373
  }
350
374
  return { content: [{ type: "text", text: JSON.stringify(data) }] };
351
- } catch {
352
- return { content: [{ type: "text", text: publicErrorMessage("service_unavailable") }], isError: true };
375
+ } catch (err) {
376
+ return unclassifiedTransportFailure(path, err);
353
377
  }
354
378
  }
355
379
  async getTextArtifact(path, maxBytes, timeoutMs = this.timeoutMs) {
@@ -386,7 +410,7 @@ var HttpMcpToolExecutor = class {
386
410
  }]
387
411
  };
388
412
  } catch (err) {
389
- return { content: [{ type: "text", text: publicErrorMessage("service_unavailable") }], isError: true };
413
+ return unclassifiedTransportFailure(path, err);
390
414
  }
391
415
  }
392
416
  harvestPaa(input) {
@@ -955,7 +979,7 @@ render();
955
979
  }
956
980
 
957
981
  // src/version.ts
958
- var PACKAGE_VERSION = "0.49.0";
982
+ var PACKAGE_VERSION = "0.51.0";
959
983
 
960
984
  // src/mcp/browser-agent-tool-schemas.ts
961
985
  var import_zod = require("zod");
@@ -5493,7 +5517,8 @@ ${t.topQuestions.map((q) => `- ${q}`).join("\n")}` : ""
5493
5517
  ${q.threadUrl}` : ""}`).join("\n");
5494
5518
  const full = [
5495
5519
  `# Reddit Trending: "${d.topic || input.topic}"${subreddit ? ` in r/${subreddit}` : ""}`,
5496
- `**${totals.threads} threads \xB7 ${totals.upvotes} upvotes \xB7 ${totals.comments} comments** \xB7 last ${d.window === "7d" ? "week" : "month"} \xB7 ${d.threadsScraped ?? 0} of ${d.candidatesFound ?? threads.length} discovered scraped${d.partial ? " (partial \u2014 hit the time limit)" : ""}`,
5520
+ `**${totals.threads} threads \xB7 ${totals.upvotes} upvotes \xB7 ${totals.comments} comments** \xB7 last ${d.window === "7d" ? "week" : "month"} \xB7 ${d.threadsScraped ?? 0} of ${d.candidatesFound ?? threads.length} discovered scraped${d.partial ? " (partial)" : ""}`,
5521
+ d.degradedResult ? `**Discovery degraded:** ${(d.degradationReasons ?? []).join(", ") || "no usable discovery surface"}${d.retryRecommended ? " \xB7 retry recommended" : ""}${d.billingRefunded ? " \xB7 discovery charge refunded" : ""}` : d.discoverySource === "reddit_search_fallback" ? "**Discovery fallback:** direct Reddit search was used after the primary SERP returned no usable threads." : "",
5497
5522
  `
5498
5523
  ## Ranked threads
5499
5524
  ${threadBlocks || "_No threads found._"}`,
@@ -5525,7 +5550,13 @@ ${questionList || "_No questions extracted._"}`,
5525
5550
  threadsScraped: Number(d.threadsScraped ?? 0),
5526
5551
  candidatesFound: Number(d.candidatesFound ?? threads.length),
5527
5552
  partial: Boolean(d.partial),
5528
- searchQuery: d.searchQuery ?? ""
5553
+ searchQuery: d.searchQuery ?? "",
5554
+ discoverySource: d.discoverySource ?? "google_serp",
5555
+ resultQuality: d.resultQuality ?? "complete",
5556
+ degradedResult: Boolean(d.degradedResult),
5557
+ degradationReasons: d.degradationReasons ?? [],
5558
+ retryRecommended: Boolean(d.retryRecommended),
5559
+ billingRefunded: Boolean(d.billingRefunded)
5529
5560
  }
5530
5561
  };
5531
5562
  }
@@ -7061,7 +7092,10 @@ seam is noted so you can chain them.
7061
7092
  handles Reddit's bot wall itself (no login needed). Find threads first with \`search_serp\` or \`reddit_trending\`.
7062
7093
  - DISCOVER what a niche is talking about (topic, no known thread) -> **reddit_trending** (takes a topic, optional
7063
7094
  subreddit; returns the last 30 days' top threads ranked by engagement plus the questions people asked \u2014
7064
- feed winning \`rankedThreads[].url\` values into \`reddit_thread\` for the full comment tree).
7095
+ feed winning \`rankedThreads[].url\` values into \`reddit_thread\` for the full comment tree). It uses bounded
7096
+ direct Reddit discovery when the primary SERP is empty. Before interpreting an empty result, inspect
7097
+ \`resultQuality\`, \`discoverySource\`, \`degradationReasons\`, \`retryRecommended\`, and \`billingRefunded\`;
7098
+ a degraded empty result is not evidence that the topic has no Reddit discussion.
7065
7099
 
7066
7100
  ## Other sites & logins (browser agent)
7067
7101
  For an arbitrary site or a logged-in dashboard with no dedicated tool, use the browser_* agent. **First
@@ -7111,6 +7145,12 @@ Multi-step orchestrations \u2014 prefer these over hand-chaining primitives when
7111
7145
  versioning reusable website templates; use the saved-template tools above for those jobs.
7112
7146
  - The creation tool is a renderer, not a research or writing model. Preserve source truth in each
7113
7147
  \`sourceLabel\`; do not hand it raw source material and expect it to invent the editorial architecture.
7148
+ - One edition may contain up to 100 articles. Images may appear as structured article/card heroes or as
7149
+ Markdown body images. Use \`site.ogImage\` for the collection social preview and \`article.ogImage\` for an
7150
+ article override; otherwise the article hero, then collection image, is reused. Every image requires useful
7151
+ alt text. Preserve caption, credit, source URL, and rights context when known; a reachable URL does not prove
7152
+ reuse rights. Static artifacts include collection OG tags and update article tags in-browser, while crawler-
7153
+ perfect per-article unfurls require the publishing host to serve article-specific metadata.
7114
7154
  - ${savesReportsLocally ? "This local stdio server writes one self-contained HTML file and returns its localPath so the user can open it." : "This hosted server creates a private seven-day HTML artifact and returns a signed download URL; use renew_editorial_reading_room_download after the URL expires."}
7115
7155
 
7116
7156
  ## Local Sourcebook listings
@@ -7202,6 +7242,17 @@ deliberate edits and migrations. Use
7202
7242
  they'll filter/sort by exact value. **memory-search** is meaning-based over full content (embeds, slower);
7203
7243
  **memory-list** filters one vault by kind/tags (fast, exact).
7204
7244
 
7245
+ Choose the read surface by completeness, not convenience. **list-vaults** is the account inventory and
7246
+ reports each vault's note count. **memory-list** returns the complete metadata inventory for one vault but
7247
+ no note bodies, plus a sorted complete folder inventory derived from those paths; use it to identify every
7248
+ stable \`vault + path\` address. **list-memory-tags** returns the
7249
+ complete account-wide canonical tag inventory, including aliases, usage counts, and per-vault distribution.
7250
+ **memory-search** returns ranked
7251
+ content chunks, not an exhaustive inventory or complete documents: deduplicate hits by vault/path and call
7252
+ **memory-get** for every note whose full meaning matters. When the user explicitly needs every full note for
7253
+ backup, migration, or corpus-wide audit, use **memory-export** one vault at a time; do not pull the entire
7254
+ corpus merely to edit one note.
7255
+
7205
7256
  For People, Deals, Projects, Tasks, and Communications, use the returned contract rather than guessing:
7206
7257
  People only holds a real person or organization hub. Its contact card uses \`phone\`, \`text_phone\`, and
7207
7258
  \`email\` for Call/Text/Email; \`memories\` for durable person context; and linked Deals, Projects,
@@ -7260,19 +7311,35 @@ Tags are live vocabulary, not improvised labels: **list-memory-tags** shows what
7260
7311
  reusable, and has no exact, alias, or near-equivalent. Use **memory-backlinks**,
7261
7312
  **memory-graph-universe**, and **memory-graph-path** to trace the linked universe across vaults.
7262
7313
 
7263
- **Always inspect the complete tag inventory and related notes first.** Use hybrid Smart RAG by default:
7314
+ **Always inspect the complete tag inventory and related notes first.** When the user wants to find, recall,
7315
+ understand, or connect something and does not already provide an exact vault/path, start with hybrid Smart
7316
+ RAG through **memory-search**. The exceptions are exhaustive inventory (**memory-list**), title-only lookup
7317
+ (**memory-suggest**), an exact known note (**memory-get**), and an explicit full-vault export (**memory-export**).
7318
+ For hybrid retrieval,
7264
7319
  form 3 focused queries (2\u20134 when useful), fuse exact tag/metadata/vault/date and semantic matches into 50
7265
7320
  candidates, expand the top 8 seeds by one link/backlink hop with at most 5 neighbors each, then Jina-rerank
7266
7321
  the combined pool to the best 30. Graph neighbors are candidates, never automatic links; add only links
7267
- supported by the note contents.
7322
+ supported by the note contents. A search hit is a discovery excerpt, not the note: call **memory-get** and read
7323
+ the complete note before relying on it for an answer, summary, edit, relationship, or durable write. Read the
7324
+ strong candidates, not every low-ranked hit.
7268
7325
 
7269
7326
  Scrape deposits are raw evidence and therefore go to **Library** through **library-ingest**, with the full
7270
7327
  Library template and source metadata. If the source contains durable applicable guidance, create a separate
7271
7328
  Knowledge companion through prepare-memory-write + memory-capture and link it to the Library source with
7272
7329
  derived_from; do not replace the raw source with the guide.
7273
7330
 
7274
- For an update, call **memory-get** first and pass its revision as baseRevision. Preserve the existing
7275
- title, source, capture time, content context, and props unless the request deliberately changes them.
7331
+ For an update, identify the existing note by its stable \`vault + path\`, call **memory-get** first, and pass
7332
+ its revision as \`baseRevision\`. **memory-put replaces the entire content body; it is not a text patch.**
7333
+ Merge the requested change into the full body returned by memory-get, then send that complete merged body.
7334
+ Its supplied \`props\` patch existing metadata, so omit unchanged props and use an empty array only when the
7335
+ user deliberately wants to clear a link list. Preserve the existing title, source, capture time, surrounding
7336
+ content, links, template sections, and unsupported uncertainty unless the request deliberately changes them.
7337
+ A title change does not create a new note identity; keep the path unless the user explicitly asks to move it.
7338
+ Never convert an edit into a new path just because search returned a similar title. If \`baseRevision\`
7339
+ conflicts, reconcile the returned current body with the requested change and retry against the new revision;
7340
+ do not resend the stale full body unchanged. Treat Agent Inbox, optimizer rollups, channel messages, and other
7341
+ system-managed notes through their purpose-built tools when available rather than rewriting their backing
7342
+ notes with memory-put.
7276
7343
  If a legacy backend does not return props, do not overwrite an existing linked note through that surface;
7277
7344
  report that link preservation cannot be proved. After the write, read it back and search a distinctive
7278
7345
  phrase to verify persistence and indexing.
@@ -8647,7 +8714,22 @@ var EditorialReadingRoomSiteSchema = import_zod6.z.object({
8647
8714
  issueLabel: import_zod6.z.string().trim().min(1).max(100).default("Current edition").describe("Issue, date, or collection label in the home-page issue line."),
8648
8715
  eyebrow: import_zod6.z.string().trim().min(1).max(120).default("A guided collection").describe("Short editorial eyebrow above the home-page headline."),
8649
8716
  heroTitle: import_zod6.z.string().trim().min(1).max(180).describe("Outcome-led home-page headline for the whole reading room."),
8650
- startLabel: import_zod6.z.string().trim().min(1).max(60).default("Start reading").describe("Label for the primary start-reading button.")
8717
+ startLabel: import_zod6.z.string().trim().min(1).max(60).default("Start reading").describe("Label for the primary start-reading button."),
8718
+ ogImage: import_zod6.z.object({
8719
+ url: import_zod6.z.string().url().refine((value) => /^https?:\/\//i.test(value), "Image URL must use HTTP or HTTPS.").describe("Public HTTP(S) image URL used for the reading-room home page social preview."),
8720
+ alt: import_zod6.z.string().trim().min(1).max(500).describe("Accessible description and og:image:alt text."),
8721
+ width: import_zod6.z.number().int().positive().optional().describe("Optional intrinsic width in pixels."),
8722
+ height: import_zod6.z.number().int().positive().optional().describe("Optional intrinsic height in pixels.")
8723
+ }).strict().optional().describe("Optional collection-level Open Graph image. Individual articles may override it.")
8724
+ }).strict();
8725
+ var EditorialReadingRoomImageSchema = import_zod6.z.object({
8726
+ url: import_zod6.z.string().url().refine((value) => /^https?:\/\//i.test(value), "Image URL must use HTTP or HTTPS.").describe("Public HTTP(S) image URL."),
8727
+ alt: import_zod6.z.string().trim().min(1).max(500).describe("Required accessible description of the image."),
8728
+ caption: import_zod6.z.string().trim().max(1e3).optional().describe("Optional visible caption."),
8729
+ credit: import_zod6.z.string().trim().max(500).optional().describe("Optional visible creator, publisher, or rights credit."),
8730
+ sourceUrl: import_zod6.z.string().url().refine((value) => /^https?:\/\//i.test(value), "Source URL must use HTTP or HTTPS.").optional().describe("Optional public HTTP(S) source page for provenance or rights context."),
8731
+ width: import_zod6.z.number().int().positive().optional().describe("Optional intrinsic width in pixels."),
8732
+ height: import_zod6.z.number().int().positive().optional().describe("Optional intrinsic height in pixels.")
8651
8733
  }).strict();
8652
8734
  var EditorialReadingRoomArticleSchema = import_zod6.z.object({
8653
8735
  slug: import_zod6.z.string().trim().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).max(80).describe("Unique kebab-case article identifier."),
@@ -8660,7 +8742,9 @@ var EditorialReadingRoomArticleSchema = import_zod6.z.object({
8660
8742
  sourceLabel: import_zod6.z.string().trim().min(1).max(500).describe("Visible provenance label naming the material this article was derived from. Do not invent a source."),
8661
8743
  revision: import_zod6.z.string().trim().min(1).max(80).optional().describe("Optional revision identifier or version label."),
8662
8744
  updatedAt: import_zod6.z.string().trim().min(1).max(80).optional().describe("Optional human-readable source update date."),
8663
- markdown: import_zod6.z.string().min(1).max(1e5).describe("Complete article body in Markdown. Use H2/H3 headings for jump links, short paragraphs, concrete examples, and tables only where they improve comparison.")
8745
+ image: EditorialReadingRoomImageSchema.optional().describe("Optional article image shown on cards and above the article body. Markdown images remain supported inside the body."),
8746
+ ogImage: EditorialReadingRoomImageSchema.optional().describe("Optional article-specific social preview image. Defaults to article.image, then site.ogImage."),
8747
+ markdown: import_zod6.z.string().min(1).max(1e5).describe("Complete article body in Markdown. Standard Markdown images are allowed with descriptive alt text. Use H2/H3 headings for jump links, short paragraphs, concrete examples, and tables only where they improve comparison.")
8664
8748
  }).strict();
8665
8749
  var EditorialReadingRoomGuideInputSchema = {
8666
8750
  focus: import_zod6.z.enum(["workflow", "content_contract", "example"]).default("workflow").describe("Which part of the reusable editorial-reading-room guide to return. Start with workflow; fetch the content contract or compact example only when needed.")
@@ -8673,7 +8757,7 @@ var EditorialReadingRoomGuideOutputSchema = {
8673
8757
  var CreateEditorialReadingRoomInputSchema = {
8674
8758
  site: EditorialReadingRoomSiteSchema,
8675
8759
  deck: import_zod6.z.string().trim().min(1).max(1e3).describe("Two or three sentences that explain the collection\u2019s value and scope without generic marketing language."),
8676
- articles: import_zod6.z.array(EditorialReadingRoomArticleSchema).min(1).max(40).describe("One to forty fully authored articles, with no more than 2,000,000 Markdown bytes combined. Read all in-scope source material before composing them; preserve distinctions, uncertainty, and provenance instead of flattening the corpus."),
8760
+ articles: import_zod6.z.array(EditorialReadingRoomArticleSchema).min(1).max(100).describe("One to one hundred fully authored articles, with no more than 2,000,000 Markdown bytes combined. Articles may include structured card/hero images, article-specific Open Graph images, and Markdown body images. Read all in-scope source material before composing them; preserve distinctions, uncertainty, image provenance, and rights context instead of flattening the corpus."),
8677
8761
  filename: import_zod6.z.string().trim().regex(/^[a-zA-Z0-9][a-zA-Z0-9._-]*$/).max(120).optional().describe("Optional download filename. The server always normalizes it to a safe .html filename.")
8678
8762
  };
8679
8763
  var EditorialReadingRoomArtifactSchema = import_zod6.z.object({
@@ -9500,7 +9584,13 @@ var RedditTrendingOutputSchema = {
9500
9584
  threadsScraped: import_zod6.z.number().int().min(0),
9501
9585
  candidatesFound: import_zod6.z.number().int().min(0),
9502
9586
  partial: import_zod6.z.boolean(),
9503
- searchQuery: import_zod6.z.string()
9587
+ searchQuery: import_zod6.z.string(),
9588
+ discoverySource: import_zod6.z.enum(["google_serp", "reddit_search_fallback", "none"]),
9589
+ resultQuality: import_zod6.z.enum(["complete", "partial", "degraded"]),
9590
+ degradedResult: import_zod6.z.boolean(),
9591
+ degradationReasons: import_zod6.z.array(import_zod6.z.string()),
9592
+ retryRecommended: import_zod6.z.boolean(),
9593
+ billingRefunded: import_zod6.z.boolean()
9504
9594
  };
9505
9595
  var FacebookPageIntelOutputSchema = {
9506
9596
  advertiserName: NullableString2,
@@ -10666,10 +10756,11 @@ var WORKFLOW_GUIDE = `Create an editorial reading room only after doing the inte
10666
10756
  2. Read every in-scope source before designing the page. Build a source inventory with purpose, authority, overlap, and provenance.
10667
10757
  3. Architect the corpus into a small editorial edition. Prefer one article per real question, decision, lesson, or reusable pattern. Merge duplicate material; preserve meaningful distinctions and uncertainty.
10668
10758
  4. Write the collection-level promise: a specific hero title and deck that explain what the reader will understand or be able to do.
10669
- 5. Author complete articles in Markdown. Use H2/H3 headings as a useful table of contents, short paragraphs, concrete examples, and tables only when they materially improve comparison.
10670
- 6. Preserve provenance in sourceLabel. Never invent a source, fact, result, quote, or certainty that the source material does not support.
10671
- 7. Call create_editorial_reading_room with the finished site metadata, deck, and ordered articles. Do not ask the renderer to discover, research, or write the content for you.
10672
- 8. Inspect the returned page at both mobile and desktop sizes. Verify navigation, jump links, article order, typography, overflow, source labels, and that the page opens without a build step.
10759
+ 5. Author complete articles in Markdown. Use H2/H3 headings as a useful table of contents, short paragraphs, concrete examples, and tables only when they materially improve comparison. Markdown images are supported inside the body.
10760
+ 6. Choose images only when they help the reader identify, understand, compare, or remember the material. Use article.image for the card/article hero, article.ogImage for a distinct social preview, and site.ogImage for the collection default. Every image needs descriptive alt text; preserve caption, credit, source URL, and rights context when known. Never invent attribution or imply usage rights.
10761
+ 7. Preserve provenance in sourceLabel. Never invent a source, fact, result, quote, or certainty that the source material does not support.
10762
+ 8. Call create_editorial_reading_room with the finished site metadata, deck, and ordered articles. Do not ask the renderer to discover, research, or write the content for you.
10763
+ 9. Inspect the returned page at both mobile and desktop sizes. Verify navigation, jump links, article order, images, alt text, typography, overflow, source labels, social metadata, and that the page opens without a build step.
10673
10764
 
10674
10765
  The renderer owns the reusable New York Times-inspired reading surface, responsive hamburger navigation, search, article jump links, progress, text-size controls, evening mode, and portable single-file HTML delivery.`;
10675
10766
  var CONTENT_CONTRACT = `Editorial reading-room content contract
@@ -10682,13 +10773,16 @@ var CONTENT_CONTRACT = `Editorial reading-room content contract
10682
10773
  - site.eyebrow: collection framing, not a duplicate headline.
10683
10774
  - site.heroTitle: specific outcome or understanding promised by the collection.
10684
10775
  - site.startLabel: concise reading CTA.
10776
+ - site.ogImage: optional collection-level Open Graph image with required alt text.
10685
10777
  - deck: two or three concrete sentences covering value and scope.
10686
- - articles: 1-40 complete editorial pieces, each with a unique slug and order.
10778
+ - articles: 1-100 complete editorial pieces, each with a unique slug and order.
10687
10779
  - article.category: a repeated grouping label when multiple pieces belong together.
10688
10780
  - article.kicker: short framing line.
10689
10781
  - article.title: the question, decision, lesson, or reusable pattern.
10690
10782
  - article.summary: what the reader will understand.
10691
10783
  - article.sourceLabel: visible, truthful provenance.
10784
+ - article.image: optional card/article hero image with alt text and optional caption, credit, source URL, and dimensions.
10785
+ - article.ogImage: optional article-specific social image; otherwise article.image, then site.ogImage is used.
10692
10786
  - article.markdown: full body with useful H2/H3 headings.
10693
10787
 
10694
10788
  Quality gates:
@@ -10697,6 +10791,7 @@ Quality gates:
10697
10791
  - Do not use placeholder copy.
10698
10792
  - Keep headings descriptive enough to work as jump links.
10699
10793
  - Prefer a coherent reading sequence over source-file order.
10794
+ - Use only public HTTP(S) image URLs. Preserve provenance and rights context; an available URL is not proof of reuse rights.
10700
10795
  - If the corpus is too thin for multiple articles, create one strong article instead of padding the edition.`;
10701
10796
  var EXAMPLE = `Compact example:
10702
10797
 
@@ -10710,7 +10805,11 @@ var EXAMPLE = `Compact example:
10710
10805
  "issueLabel": "Pattern library",
10711
10806
  "eyebrow": "A practical field guide",
10712
10807
  "heroTitle": "Make every saved note easier to find and reuse",
10713
- "startLabel": "Begin with the pattern"
10808
+ "startLabel": "Begin with the pattern",
10809
+ "ogImage": {
10810
+ "url": "https://example.com/reading-room-social.jpg",
10811
+ "alt": "Connected notes arranged as a navigable editorial collection"
10812
+ }
10714
10813
  },
10715
10814
  "deck": "A concise guide to placing new material in the right vault, connecting it to natural neighbors, and preserving source evidence without turning memory into a generic notes bucket.",
10716
10815
  "articles": [{
@@ -10722,6 +10821,12 @@ var EXAMPLE = `Compact example:
10722
10821
  "summary": "A useful note is not only stored; it is classified, connected, and made retrievable.",
10723
10822
  "sourceType": "Workflow synthesis",
10724
10823
  "sourceLabel": "Derived from the MCP Memory capture contract supplied by the user.",
10824
+ "image": {
10825
+ "url": "https://example.com/graph-operation.jpg",
10826
+ "alt": "A source note connected to related project and knowledge notes",
10827
+ "caption": "Useful captures become connected retrieval objects.",
10828
+ "sourceUrl": "https://example.com/source"
10829
+ },
10725
10830
  "markdown": "## Start with the destination\\n\\nChoose the vault whose job matches the material...\\n\\n## Connect natural neighbors\\n\\nLink only relationships supported by the notes..."
10726
10831
  }]
10727
10832
  }`;
@@ -11515,7 +11620,7 @@ function registerPaaExtractorMcpTools(server, executor, options = {}) {
11515
11620
  }, async (input) => formatRedditThread(await executor.redditThread(input), input));
11516
11621
  server.registerTool("reddit_trending", {
11517
11622
  title: "Reddit Trending",
11518
- description: "Discover the top Reddit conversations about a topic from the last week or month: finds relevant recent threads via a Google site:reddit.com search (optionally scoped to one subreddit), scrapes them for real upvotes, comments, and the questions people asked, and ranks by engagement (upvotes + 2x comments). Scraping runs in parallel across the discovered threads; set includeComments:false for a fast, cheap discovery-only sweep (relevant thread list, no engagement stats, no per-thread billing) and then read the ones you want with reddit_thread. Not for reading one known thread URL \u2014 use reddit_thread for that.",
11623
+ description: "Discover top Reddit conversations from the last week or month. It tries Google site:reddit.com discovery, falls back to a bounded direct Reddit search when that SERP is empty or unavailable, then optionally scrapes threads for real upvotes, comments, questions, and engagement ranking. Inspect resultQuality, discoverySource, degradationReasons, retryRecommended, and billingRefunded before treating an empty result as a genuine lack of discussion. Set includeComments:false for a cheap discovery-only sweep; use reddit_thread for one known URL.",
11519
11624
  inputSchema: RedditTrendingInputSchema,
11520
11625
  outputSchema: recordOutputSchema("reddit_trending", RedditTrendingOutputSchema),
11521
11626
  annotations: liveWebToolAnnotations("Reddit Trending")
@@ -11754,7 +11859,7 @@ function registerPaaExtractorMcpTools(server, executor, options = {}) {
11754
11859
  }, async (input) => executor.commonsPreparePublication(input));
11755
11860
  server.registerTool("commons_validate_publication", {
11756
11861
  title: "Validate Transparent Commons Publication",
11757
- description: "Validate a publication name claim or a complete source-grounded editorial edition without writing. Use operation claim before commons_claim_publication and operation publish before commons_publish_editorial. This uses the editorial reading-room contract and checks ownership plus revision conflicts.",
11862
+ description: "Validate a publication name claim or a complete source-grounded editorial edition without writing. Publish validation accepts up to 100 articles plus structured article/card images, Markdown body images, and collection/article Open Graph images under the editorial reading-room contract. Use operation claim before commons_claim_publication and operation publish before commons_publish_editorial; ownership and revision conflicts are checked.",
11758
11863
  inputSchema: CommonsValidatePublicationInputSchema,
11759
11864
  outputSchema: recordOutputSchema("commons_validate_publication", CommonsGenericOutputSchema),
11760
11865
  annotations: { title: "Validate Transparent Commons Publication", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }
@@ -11768,7 +11873,7 @@ function registerPaaExtractorMcpTools(server, executor, options = {}) {
11768
11873
  }, async (input) => executor.commonsClaimPublication(input));
11769
11874
  server.registerTool("commons_publish_editorial", {
11770
11875
  title: "Publish Transparent Commons Editorial Edition",
11771
- description: "Publish a fully authored editorial reading-room edition to the caller-owned Transparent Commons subdomain and return permanent root, archive, and edition URLs. The calling AI must research and author the source-grounded edition first; this tool validates, renders, and persists it. For an existing edition, pass its current baseRevision. Requires an idempotencyKey; this is not the neutral wiki write tool.",
11876
+ description: "Publish up to 100 fully authored editorial pieces, including optional article/card images, Markdown body images, and collection/article Open Graph images, to the caller-owned Transparent Commons subdomain. The calling AI must research and author the source-grounded edition first; image URLs need alt text and preserved provenance/rights context. The tool validates, renders, persists, and returns permanent root, archive, and edition URLs. Existing editions require current baseRevision. Requires idempotencyKey; this is not the neutral wiki write tool.",
11772
11877
  inputSchema: CommonsPublishEditorialInputSchema,
11773
11878
  outputSchema: recordOutputSchema("commons_publish_editorial", CommonsGenericOutputSchema),
11774
11879
  annotations: { title: "Publish Transparent Commons Editorial Edition", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true }
@@ -11905,7 +12010,7 @@ function registerPaaExtractorMcpTools(server, executor, options = {}) {
11905
12010
  }, async (input) => formatWorkflowArtifactRead(await executor.workflowArtifactRead(input), input));
11906
12011
  server.registerTool("editorial_reading_room_guide", {
11907
12012
  title: "Editorial Reading Room Guide",
11908
- description: 'Read the reusable composition contract before creating an editorial reading room. It tells the calling AI how to inventory the supplied corpus, preserve source truth, architect a coherent edition, write useful articles, and verify the finished page. Start with focus "workflow"; fetch "content_contract" or "example" only when needed. This does not research, write, or create a page.',
12013
+ description: 'Read the reusable composition contract before creating an editorial reading room. It covers corpus inventory, source truth, coherent architecture, up to 100 articles, purposeful images, image provenance, collection/article Open Graph images, and finished-page verification. Start with focus "workflow"; fetch "content_contract" or "example" only when needed. This does not research, write, or create a page.',
11909
12014
  inputSchema: EditorialReadingRoomGuideInputSchema,
11910
12015
  outputSchema: recordOutputSchema("editorial_reading_room_guide", EditorialReadingRoomGuideOutputSchema),
11911
12016
  annotations: localPlanningToolAnnotations("Editorial Reading Room Guide")
@@ -11921,7 +12026,7 @@ function registerPaaExtractorMcpTools(server, executor, options = {}) {
11921
12026
  }));
11922
12027
  server.registerTool("create_editorial_reading_room", {
11923
12028
  title: "Create Editorial Reading Room",
11924
- description: `Turn fully authored, source-grounded articles into one polished mobile-first editorial report with contents, search, hamburger navigation, article jump links, reading progress, text sizing, evening mode, and provenance. Do not use this tool to discover, preview, save, or version reusable website templates; use list_artifact_templates and get_artifact_template_example for that workflow. The calling AI must first read all in-scope material and use editorial_reading_room_guide when it has not already internalized the workflow; this renderer does not perform research or invent copy. ${fileBehavior("Local stdio clients save one self-contained HTML file under the MCP Scraper output directory and return localPath.", "Hosted/app clients receive an owner-scoped private HTML artifact retained for seven days with a renewable signed download URL.")}`,
12029
+ description: `Render up to 100 fully authored, source-grounded articles into one polished mobile-first editorial report with contents, search, navigation, jump links, progress, text sizing, evening mode, provenance, structured article/card images, Markdown body images, and collection/article Open Graph metadata. Public HTTP(S) image URLs require alt text; preserve caption, credit, source, and rights context when known. The static artifact carries collection OG tags and updates article tags in-browser; a publishing host must serve article-specific metadata for crawler-perfect per-article unfurls. This renderer does not research or invent copy. For reusable website templates use list_artifact_templates instead. ${fileBehavior("Local stdio clients save one self-contained HTML file under the MCP Scraper output directory and return localPath.", "Hosted/app clients receive an owner-scoped private HTML artifact retained for seven days with a renewable signed download URL.")}`,
11925
12030
  inputSchema: CreateEditorialReadingRoomInputSchema,
11926
12031
  outputSchema: recordOutputSchema("create_editorial_reading_room", CreateEditorialReadingRoomOutputSchema),
11927
12032
  annotations: {
@@ -13318,7 +13423,7 @@ var DeleteNoteSchema = {
13318
13423
  var ExportSchema = {
13319
13424
  id: "memory-export",
13320
13425
  upstreamName: "exportTool",
13321
- description: "Export every note in a vault as a full dump for backup, migration, or bulk download \u2014 path, title, full content, kind, and last-updated per note, plus a count. Defaults to the active (or first entitled) vault. Requires export scope; the export is logged to provenance.",
13426
+ description: "Export every full note in one vault for an explicitly requested backup, migration, or corpus-wide audit \u2014 path, title, content, kind, last-updated, and count. This can be large and is not the normal way to find or edit one note: use memory-list for complete metadata inventory, memory-search for ranked recall, and memory-get for exact content. Defaults to the active or first entitled vault. Requires export scope; the export is logged to provenance.",
13322
13427
  input: {
13323
13428
  vault: import_zod10.z.string().optional().describe(
13324
13429
  "Vault to export. Optional; defaults to the session active vault, then the first vault the caller is entitled to."
@@ -13370,7 +13475,7 @@ var getTool_notePropsSchema = import_zod10.z.object({
13370
13475
  var GetSchema = {
13371
13476
  id: "memory-get",
13372
13477
  upstreamName: "getTool",
13373
- description: "Read a single note from a vault by its exact path, or by shareId for a note shared with you and accepted. Owned notes include their stored Obsidian props so edits can preserve links and template metadata. Returns a revision number \u2014 pass it as baseRevision on a later memory-put/delete-note to detect a concurrent edit instead of silently overwriting it. Requires read scope.",
13478
+ description: "Read one complete note by exact vault+path, or by accepted shareId. After memory-search identifies a strong candidate, use this before relying on it for an answer, summary, edit, link, or durable write: search results are excerpts, not complete notes. Owned notes include stored Obsidian props so edits preserve links and template metadata. Returns the revision required as baseRevision on later edits/deletes. Requires read scope.",
13374
13479
  input: {
13375
13480
  vault: import_zod10.z.string().optional().describe(
13376
13481
  "Vault to read from. Optional; defaults to the session active vault, then the first vault the caller is entitled to. Ignored when shareId is given."
@@ -13407,7 +13512,7 @@ var GetSchema = {
13407
13512
  var ListSchema = {
13408
13513
  id: "memory-list",
13409
13514
  upstreamName: "listTool",
13410
- description: "List notes in a vault \u2014 path, title, kind, tags, last-updated \u2014 optionally filtered by kind and/or tags (matches ANY given tag). Defaults to the active or first entitled vault; also returns vaults the caller is entitled to. Requires read scope.",
13515
+ description: "Return every note in one vault as a complete metadata inventory \u2014 stable path, title, kind, tags, and last-updated \u2014 plus a sorted list of every unique folder and nested folder represented by those paths. It contains no bodies. Use memory-get for exact full content, memory-search for ranked semantic recall, or memory-export only when explicitly asked for every full note. Defaults to the active or first entitled vault; also returns entitled vaults. Requires read scope.",
13411
13516
  input: {
13412
13517
  vault: import_zod10.z.string().optional().describe(
13413
13518
  "Vault to list. Optional; defaults to the session active vault, then the first vault the caller is entitled to."
@@ -13427,6 +13532,7 @@ var ListSchema = {
13427
13532
  updatedAt: import_zod10.z.string().describe("ISO-8601 timestamp of the note last update.")
13428
13533
  })
13429
13534
  ).optional().describe("The notes in the vault (metadata only, no content). Present when ok is true."),
13535
+ folders: import_zod10.z.array(import_zod10.z.string()).optional().describe("Sorted complete folder inventory derived from note paths, including represented nested parent folders. Present when ok is true."),
13430
13536
  vaults: import_zod10.z.array(import_zod10.z.string()).optional().describe("All vaults the caller is entitled to, for choosing a different vault to list."),
13431
13537
  error: import_zod10.z.string().optional().describe("Human-readable failure reason when ok is false.")
13432
13538
  },
@@ -13461,7 +13567,7 @@ var putTool_notePropsSchema = import_zod10.z.object({
13461
13567
  var PutSchema = {
13462
13568
  id: "memory-put",
13463
13569
  upstreamName: "putTool",
13464
- description: "Create or deliberately edit one note at a path in a memory vault; content is persisted and indexed for search. For normal new People, Organizations, Deals, Projects, Tasks, or Communication records, use prepare-memory-write then memory-capture: People must be real people, Organizations must be real organizations, Deals need a known party, Projects need a supported kind, Tasks can be independent Inbox todos or use a verified Project when linked, and draft emails need pending approval. For row-shaped datasets you'll filter/sort by exact value, use table-create/table-insert-rows/table-query instead. Ordinary vaults are indexed and shareable \u2014 never store real secrets there; use a secure vault (create-secure-vault) instead, which is never indexed or shareable and is encrypted at rest. Requires write scope.",
13570
+ description: "Create or deliberately edit one note at a stable vault+path. On an existing note, first call memory-get, merge the requested change into its full body, and pass that complete body plus baseRevision: content is replace-all, while supplied props patch the stored props. A conflict returns the current body for reconciliation; never retry the stale full body unchanged. Use purpose-built tools instead of rewriting system-managed Agent Inbox, optimizer, or channel backing notes. For normal new People, Organizations, Deals, Projects, Tasks, or Communication records, use prepare-memory-write then memory-capture. For row-shaped datasets use table tools. Ordinary vaults are indexed and shareable; store real secrets only in a secure vault. Requires write scope.",
13465
13571
  input: {
13466
13572
  vault: import_zod10.z.string().optional().describe(
13467
13573
  "Vault to write to. Optional; defaults to the session active vault, then the first vault the caller is entitled to. On a default-provisioned account, pick the vault whose job matches the content (see the server instructions for the full 16-vault guide) rather than defaulting blindly \u2014 e.g. a lesson learned goes in Knowledge, the raw source it came from goes in Library, a broken feature goes in Issues, a named real-world initiative goes in Projects. Do not use this low-level tool to create ordinary People, Organizations, Deals, Projects, Tasks, or Communication records: first use prepare-memory-write then memory-capture so relationships and approval state are validated."
@@ -13469,9 +13575,9 @@ var PutSchema = {
13469
13575
  path: import_zod10.z.string().optional().describe("Vault-relative note path to create or overwrite, e.g. projects/q3-plan. Writing an existing path replaces it. Required unless shareId is given."),
13470
13576
  shareId: import_zod10.z.string().optional().describe("Edit a note someone individually shared with you and you accepted (accept-share), by its shareId, instead of vault+path. Requires the share to grant edit permission, and baseRevision is mandatory (get the current revision first) since you are editing alongside the owner and possibly others."),
13471
13577
  title: import_zod10.z.string().optional().describe("Optional human-readable title; defaults are derived from the path when omitted."),
13472
- content: import_zod10.z.string().min(1).describe("The full note body to store and index for semantic search. Must be non-empty."),
13578
+ content: import_zod10.z.string().min(1).describe("The complete note body to store and index. On edit this replaces the prior body, so merge the requested change into the full memory-get content before calling; never pass only the changed fragment."),
13473
13579
  props: putTool_notePropsSchema.optional().describe("Obsidian note primitives plus vault-specific template fields. On edits, supplied fields patch the stored props instead of replacing the whole object; pass an empty array to deliberately clear a link list. Type/domain/folder also steer routing when no vault is given."),
13474
- baseRevision: import_zod10.z.number().optional().describe("Revision the edit is based on (from a prior get/put). When provided, the write only applies if the note is still at this revision; otherwise it is rejected as a conflict instead of silently overwriting a concurrent edit. Omit for last-write-wins (fine for solo notes)."),
13580
+ baseRevision: import_zod10.z.number().optional().describe("Revision the edit is based on (from memory-get/put). Always supply it when an AI edits an existing note; a mismatch rejects the write and returns current content for reconciliation. Omit only for an intentional new note or explicit last-write-wins migration."),
13475
13581
  tagDescriptions: import_zod10.z.record(import_zod10.z.string(), import_zod10.z.string()).optional().describe("One-line meaning for any tag in props.tags that is new to the account, keyed by tag. Tags resolve against the account's existing vocabulary; new tags require a one-line description.")
13476
13582
  },
13477
13583
  output: {
@@ -13505,7 +13611,7 @@ var searchTool_primitiveValue = import_zod10.z.union([import_zod10.z.string(), i
13505
13611
  var SearchSchema = {
13506
13612
  id: "memory-search",
13507
13613
  upstreamName: "searchTool",
13508
- description: "Default Smart RAG search across accessible memory. Form 2-4 focused query variants, combine semantic matches with exact vault/tag/date/kind/type/metadata filters, expand one bounded hop of outgoing links and backlinks around strong seeds, then rerank. Defaults: retrieve/fuse 50 candidates, 8 graph seeds, 5 neighbors per seed, rerank to 30. Graph neighbors are candidates, never automatic winners or links. Before tagging or writing, also call list-memory-tags to inspect the complete vocabulary and reuse existing tags; read strong related notes before selecting links.",
13614
+ description: "Default first tool whenever the user wants to find, recall, understand, or connect Memory content without an exact vault+path. Hybrid Smart RAG combines 2-4 semantic query variants with exact vault/tag/date/kind/type/metadata matches, expands one bounded graph hop, then reranks. Results are ranked excerpts, never an exhaustive inventory or complete notes: deduplicate by vault/path and call memory-get on strong candidates before answering, summarizing, editing, linking, or writing. Use memory-list for every note, memory-suggest for title-only lookup, and memory-export only for explicit full-vault dumps. Before tagging or writing, also inspect list-memory-tags.",
13509
13615
  input: {
13510
13616
  vault: import_zod10.z.string().optional().describe("Exact logical vault handle to search. Omit to search every entitled vault."),
13511
13617
  query: import_zod10.z.string().min(1).describe("A focused semantic reformulation of the request."),