mcp-scraper 0.45.0 → 0.47.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 (54) hide show
  1. package/README.md +6 -2
  2. package/dist/bin/api-server.cjs +1098 -198
  3. package/dist/bin/api-server.cjs.map +1 -1
  4. package/dist/bin/api-server.js +3 -3
  5. package/dist/bin/mcp-scraper-cli.cjs +1 -1
  6. package/dist/bin/mcp-scraper-cli.cjs.map +1 -1
  7. package/dist/bin/mcp-scraper-cli.js +1 -1
  8. package/dist/bin/mcp-scraper-install.cjs +3 -2
  9. package/dist/bin/mcp-scraper-install.cjs.map +1 -1
  10. package/dist/bin/mcp-scraper-install.js +2 -2
  11. package/dist/bin/mcp-stdio-server.cjs +251 -34
  12. package/dist/bin/mcp-stdio-server.cjs.map +1 -1
  13. package/dist/bin/mcp-stdio-server.js +5 -5
  14. package/dist/bin/paa-harvest.cjs.map +1 -1
  15. package/dist/bin/paa-harvest.js +3 -3
  16. package/dist/{chunk-5X7CJEK3.js → chunk-5S6LYQQO.js} +2 -2
  17. package/dist/chunk-5S6LYQQO.js.map +1 -0
  18. package/dist/{chunk-OVD4E4AP.js → chunk-GV5EGE5M.js} +2 -2
  19. package/dist/chunk-H4NWAF5B.js +7 -0
  20. package/dist/chunk-H4NWAF5B.js.map +1 -0
  21. package/dist/{chunk-T5AFM4G5.js → chunk-IWYYZXBR.js} +2 -2
  22. package/dist/{chunk-RJMOOII7.js → chunk-JH7A4HA7.js} +2 -2
  23. package/dist/{chunk-JFOT5JEL.js → chunk-MW3ET532.js} +2 -2
  24. package/dist/{chunk-GRODXRUY.js → chunk-QSUGPYGQ.js} +3 -2
  25. package/dist/chunk-QSUGPYGQ.js.map +1 -0
  26. package/dist/{chunk-WT2UHDSE.js → chunk-TV6KPZ6J.js} +2 -2
  27. package/dist/{chunk-FQIICRR4.js → chunk-XCGQBGDA.js} +296 -38
  28. package/dist/chunk-XCGQBGDA.js.map +1 -0
  29. package/dist/{db-4ABEYNDM.js → db-W3RPRILW.js} +2 -2
  30. package/dist/{extract-bundle-DYMQRQWG.js → extract-bundle-DXWWQER6.js} +3 -3
  31. package/dist/index.cjs.map +1 -1
  32. package/dist/index.js +3 -3
  33. package/dist/{location-data-repository-HDNCU4Z4.js → location-data-repository-2FJVMTZ2.js} +3 -3
  34. package/dist/{server-7B75SDNG.js → server-OHMZJRSB.js} +778 -141
  35. package/dist/server-OHMZJRSB.js.map +1 -0
  36. package/dist/{site-extract-repository-G723PZIL.js → site-extract-repository-UULQAGO4.js} +3 -3
  37. package/dist/{worker-4LZGRHDA.js → worker-3QX7LG62.js} +5 -5
  38. package/package.json +2 -2
  39. package/dist/chunk-5X7CJEK3.js.map +0 -1
  40. package/dist/chunk-CEZ3NFBP.js +0 -7
  41. package/dist/chunk-CEZ3NFBP.js.map +0 -1
  42. package/dist/chunk-FQIICRR4.js.map +0 -1
  43. package/dist/chunk-GRODXRUY.js.map +0 -1
  44. package/dist/server-7B75SDNG.js.map +0 -1
  45. /package/dist/{chunk-OVD4E4AP.js.map → chunk-GV5EGE5M.js.map} +0 -0
  46. /package/dist/{chunk-T5AFM4G5.js.map → chunk-IWYYZXBR.js.map} +0 -0
  47. /package/dist/{chunk-RJMOOII7.js.map → chunk-JH7A4HA7.js.map} +0 -0
  48. /package/dist/{chunk-JFOT5JEL.js.map → chunk-MW3ET532.js.map} +0 -0
  49. /package/dist/{chunk-WT2UHDSE.js.map → chunk-TV6KPZ6J.js.map} +0 -0
  50. /package/dist/{db-4ABEYNDM.js.map → db-W3RPRILW.js.map} +0 -0
  51. /package/dist/{extract-bundle-DYMQRQWG.js.map → extract-bundle-DXWWQER6.js.map} +0 -0
  52. /package/dist/{location-data-repository-HDNCU4Z4.js.map → location-data-repository-2FJVMTZ2.js.map} +0 -0
  53. /package/dist/{site-extract-repository-G723PZIL.js.map → site-extract-repository-UULQAGO4.js.map} +0 -0
  54. /package/dist/{worker-4LZGRHDA.js.map → worker-3QX7LG62.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-CEZ3NFBP.js";
14
+ } from "../chunk-H4NWAF5B.js";
15
15
 
16
16
  // src/cli/human-cli.ts
17
17
  import { Command } from "commander";
@@ -53,13 +53,14 @@ function renderInstallTerminal(options) {
53
53
  "1/1 install surfaces ready",
54
54
  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),
55
55
  "",
56
- `${colorize("Tools", "cyan", color)} ${colorize("(215 MCP tools)", "muted", color)}`,
56
+ `${colorize("Tools", "cyan", color)} ${colorize("(220 MCP tools)", "muted", color)}`,
57
57
  toolRow("search", ["harvest_paa", "search_serp", "maps_search", "maps_place_intel"], color),
58
58
  toolRow("extract", ["extract_url", "map_site_urls", "extract_site", "audit_site", "directory_workflow"], color),
59
59
  toolRow("build", ["create_editorial_reading_room", "rank_tracker_workflow", "portable HTML"], color),
60
60
  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),
61
61
  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),
62
62
  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),
63
+ toolRow("commons", ["commons_search_entities", "commons_prepare_entity", "commons_submit_entity", "commons_prepare_publication", "commons_claim_publication", "commons_publish_editorial", "commons_get_publication"], color),
63
64
  toolRow("account", ["credits_info", "reports", "MCP resources"], color),
64
65
  toolRow("memory", ["memory-put", "memory-get", "memory-search", "list-vaults", "record-fact", "list-scheduled-actions"], color),
65
66
  `${colorize("Workflows", "cyan", color)} ${colorize("(MCP + CLI + API)", "muted", color)}`,
@@ -106,7 +107,7 @@ function renderInstallTerminal(options) {
106
107
  }
107
108
 
108
109
  // src/version.ts
109
- var PACKAGE_VERSION = "0.45.0";
110
+ var PACKAGE_VERSION = "0.47.0";
110
111
 
111
112
  // bin/mcp-scraper-install.ts
112
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('(215 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('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.45.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,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A,IACA,SAAS,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;;;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('(220 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_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.47.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,OAAO,S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AAkB,QAAQ,QAAQ,IAAI,qBAAqB,KAAK,CAAC;AACnE,CAAC,CAAC;","names":[]}
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  renderInstallTerminal
4
- } from "../chunk-GRODXRUY.js";
4
+ } from "../chunk-QSUGPYGQ.js";
5
5
  import {
6
6
  PACKAGE_VERSION
7
- } from "../chunk-CEZ3NFBP.js";
7
+ } from "../chunk-H4NWAF5B.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;
@@ -669,6 +669,28 @@ var HttpMcpToolExecutor = class {
669
669
  commonsListNeedsLinks(input) {
670
670
  return this.call("/commons/needs-links/search", input);
671
671
  }
672
+ commonsPreparePublication(input) {
673
+ return this.call("/commons/publications/prepare", input);
674
+ }
675
+ commonsValidatePublication(input) {
676
+ return this.call("/commons/publications/validate", input);
677
+ }
678
+ commonsClaimPublication(input) {
679
+ const { idempotencyKey, ...body } = input;
680
+ return this.call("/commons/publications/claim", { ...body, idempotencyKey }, this.timeoutMs, "POST", {
681
+ "Idempotency-Key": `commons-publication-claim-${(0, import_node_crypto.createHash)("sha256").update(idempotencyKey).digest("hex")}`
682
+ });
683
+ }
684
+ commonsPublishEditorial(input) {
685
+ const { idempotencyKey, ...body } = input;
686
+ return this.call("/commons/publications/publish", { ...body, idempotencyKey }, this.timeoutMs, "POST", {
687
+ "Idempotency-Key": `commons-publication-publish-${(0, import_node_crypto.createHash)("sha256").update(idempotencyKey).digest("hex")}`
688
+ });
689
+ }
690
+ commonsGetPublication(input) {
691
+ const query = new URLSearchParams({ includeEditions: String(input.includeEditions ?? true) });
692
+ return this.getJson(input.subdomain ? `/commons/publications/${encodeURIComponent(input.subdomain)}?${query}` : `/commons/publications/me?${query}`);
693
+ }
672
694
  async captureSerpSnapshot(input) {
673
695
  const fingerprint = (0, import_node_crypto.createHash)("sha256").update(JSON.stringify(input)).digest("hex");
674
696
  const now = Date.now();
@@ -832,7 +854,7 @@ render();
832
854
  }
833
855
 
834
856
  // src/version.ts
835
- var PACKAGE_VERSION = "0.45.0";
857
+ var PACKAGE_VERSION = "0.47.0";
836
858
 
837
859
  // src/mcp/browser-agent-tool-schemas.ts
838
860
  var import_zod = require("zod");
@@ -6872,6 +6894,18 @@ seam is noted so you can chain them.
6872
6894
  Use saved filters when a person wants their MCP to operate inside a reading room, trail, source scope,
6873
6895
  category, tag bundle, media constraint, or other personalized subset of the shared Commons graph.
6874
6896
 
6897
+ ## Transparent Commons user publications
6898
+ - A user-owned editorial publication is separate from the neutral public wiki. Start with
6899
+ **commons_prepare_publication** to normalize the requested subdomain, check availability, and read the live
6900
+ ownership contract. Then call **commons_validate_publication** with operation \`claim\` before
6901
+ **commons_claim_publication**.
6902
+ - Each account may claim one stable name at \`https://{name}.transparent-commons.cc\`. Claims require an
6903
+ idempotency key and never publish content by themselves.
6904
+ - To publish, use **editorial_reading_room_guide** when needed, research and author the complete source-grounded
6905
+ edition, validate it with **commons_validate_publication** operation \`publish\`, then call
6906
+ **commons_publish_editorial**. The publish result returns the permanent publication, archive, and edition URLs.
6907
+ - Use **commons_get_publication** to recover the caller's publication and current edition revisions. Existing
6908
+ edition edits require the returned baseRevision. Only the account that claimed the subdomain can publish to it.
6875
6909
 
6876
6910
  ## Google Maps
6877
6911
  - Find multiple places/competitors/prospects -> **maps_search** (returns \`results[]\` with name,
@@ -7334,13 +7368,33 @@ var ScheduledArtifactSelectionSchema = import_zod3.z.discriminatedUnion("mode",
7334
7368
  templateVersionId: import_zod3.z.string().uuid()
7335
7369
  }).strict()
7336
7370
  ]);
7337
- var ArtifactTemplateConfigSchema = import_zod3.z.object({
7371
+ var EditorialArtifactTemplateConfigSchema = import_zod3.z.object({
7338
7372
  theme: import_zod3.z.enum(["paper", "ink", "warm"]),
7339
7373
  density: import_zod3.z.enum(["comfortable", "compact"]),
7340
7374
  showSourceRail: import_zod3.z.boolean(),
7341
7375
  showGeneratedAt: import_zod3.z.boolean(),
7342
7376
  brandName: import_zod3.z.string().trim().min(1).max(80).optional()
7343
7377
  }).strict();
7378
+ var PersonalAuthorityFeatureFlagsSchema = import_zod3.z.object({
7379
+ navigation: import_zod3.z.boolean(),
7380
+ socialLinks: import_zod3.z.boolean(),
7381
+ authority: import_zod3.z.boolean(),
7382
+ consultation: import_zod3.z.boolean(),
7383
+ learning: import_zod3.z.boolean(),
7384
+ services: import_zod3.z.boolean(),
7385
+ proof: import_zod3.z.boolean(),
7386
+ finalCta: import_zod3.z.boolean()
7387
+ }).strict();
7388
+ var PersonalAuthorityTemplateConfigSchema = import_zod3.z.object({
7389
+ theme: import_zod3.z.enum(["blue", "slate", "monochrome"]),
7390
+ showGeneratedAt: import_zod3.z.boolean(),
7391
+ brandName: import_zod3.z.string().trim().min(1).max(80).optional(),
7392
+ featureFlags: PersonalAuthorityFeatureFlagsSchema
7393
+ }).strict();
7394
+ var ArtifactTemplateConfigSchema = import_zod3.z.union([
7395
+ EditorialArtifactTemplateConfigSchema,
7396
+ PersonalAuthorityTemplateConfigSchema
7397
+ ]);
7344
7398
  var EditorialReadingRoomV1InputSchema = import_zod3.z.object({
7345
7399
  title: import_zod3.z.string().trim().min(1).max(300),
7346
7400
  dek: import_zod3.z.string().trim().max(1e3).optional(),
@@ -7373,25 +7427,104 @@ var EditorialReadingRoomV1InputSchema = import_zod3.z.object({
7373
7427
  });
7374
7428
  }
7375
7429
  });
7376
- var CreateArtifactTemplateInputSchema = import_zod3.z.object({
7377
- presetKey: import_zod3.z.literal("editorial_reading_room_v1"),
7430
+ var PersonalAuthorityActionSchema = import_zod3.z.object({
7431
+ label: import_zod3.z.string().trim().min(1).max(120),
7432
+ href: import_zod3.z.string().trim().min(1).max(2e3)
7433
+ }).strict();
7434
+ var PersonalAuthorityV1InputSchema = import_zod3.z.object({
7435
+ name: import_zod3.z.string().trim().min(1).max(160),
7436
+ professionalTitle: import_zod3.z.string().trim().min(1).max(300),
7437
+ summary: import_zod3.z.string().trim().min(1).max(1500),
7438
+ location: import_zod3.z.string().trim().max(160).optional(),
7439
+ email: import_zod3.z.string().trim().email().max(320).optional(),
7440
+ phone: import_zod3.z.string().trim().max(80).optional(),
7441
+ primaryAction: PersonalAuthorityActionSchema,
7442
+ secondaryAction: PersonalAuthorityActionSchema.optional(),
7443
+ socialLinks: import_zod3.z.array(import_zod3.z.object({
7444
+ label: import_zod3.z.string().trim().min(1).max(60),
7445
+ href: import_zod3.z.string().trim().min(1).max(2e3)
7446
+ }).strict()).max(8).default([]),
7447
+ authority: import_zod3.z.object({
7448
+ heading: import_zod3.z.string().trim().min(1).max(500),
7449
+ paragraphs: import_zod3.z.array(import_zod3.z.string().trim().min(1).max(2e3)).min(1).max(6)
7450
+ }).strict().optional(),
7451
+ consultation: import_zod3.z.object({
7452
+ eyebrow: import_zod3.z.string().trim().max(120).optional(),
7453
+ heading: import_zod3.z.string().trim().min(1).max(400),
7454
+ summary: import_zod3.z.string().trim().min(1).max(1e3),
7455
+ action: PersonalAuthorityActionSchema
7456
+ }).strict().optional(),
7457
+ learning: import_zod3.z.object({
7458
+ heading: import_zod3.z.string().trim().min(1).max(400),
7459
+ summary: import_zod3.z.string().trim().max(1e3).optional(),
7460
+ topics: import_zod3.z.array(import_zod3.z.object({
7461
+ title: import_zod3.z.string().trim().min(1).max(160),
7462
+ headline: import_zod3.z.string().trim().min(1).max(300),
7463
+ summary: import_zod3.z.string().trim().min(1).max(1500),
7464
+ href: import_zod3.z.string().trim().min(1).max(2e3).optional()
7465
+ }).strict()).min(1).max(12)
7466
+ }).strict().optional(),
7467
+ services: import_zod3.z.object({
7468
+ heading: import_zod3.z.string().trim().min(1).max(400),
7469
+ summary: import_zod3.z.string().trim().max(1e3).optional(),
7470
+ offers: import_zod3.z.array(import_zod3.z.object({
7471
+ title: import_zod3.z.string().trim().min(1).max(160),
7472
+ description: import_zod3.z.string().trim().min(1).max(1500),
7473
+ action: PersonalAuthorityActionSchema.optional()
7474
+ }).strict()).min(1).max(6)
7475
+ }).strict().optional(),
7476
+ proof: import_zod3.z.object({
7477
+ heading: import_zod3.z.string().trim().min(1).max(400),
7478
+ summary: import_zod3.z.string().trim().max(1e3).optional(),
7479
+ testimonials: import_zod3.z.array(import_zod3.z.object({
7480
+ quote: import_zod3.z.string().trim().min(1).max(1500),
7481
+ person: import_zod3.z.string().trim().min(1).max(160),
7482
+ role: import_zod3.z.string().trim().max(200).optional()
7483
+ }).strict()).min(1).max(12)
7484
+ }).strict().optional(),
7485
+ finalCta: import_zod3.z.object({
7486
+ eyebrow: import_zod3.z.string().trim().max(120).optional(),
7487
+ heading: import_zod3.z.string().trim().min(1).max(400),
7488
+ summary: import_zod3.z.string().trim().max(1e3).optional(),
7489
+ action: PersonalAuthorityActionSchema
7490
+ }).strict().optional()
7491
+ }).strict();
7492
+ var TemplateIdentityFields = {
7378
7493
  name: import_zod3.z.string().trim().min(1).max(120),
7379
7494
  description: import_zod3.z.string().trim().max(500).default(""),
7380
- config: ArtifactTemplateConfigSchema,
7381
7495
  authoringInstructions: import_zod3.z.string().trim().max(4e3)
7382
- }).strict();
7383
- var UpdateArtifactTemplateInputSchema = CreateArtifactTemplateInputSchema.omit({ presetKey: true }).partial().refine((input) => Object.keys(input).length > 0, "At least one field is required");
7384
- var ArtifactTemplateVersionSchema = import_zod3.z.object({
7496
+ };
7497
+ var CreateArtifactTemplateInputSchema = import_zod3.z.discriminatedUnion("presetKey", [
7498
+ import_zod3.z.object({
7499
+ presetKey: import_zod3.z.literal("editorial_reading_room_v1"),
7500
+ ...TemplateIdentityFields,
7501
+ config: EditorialArtifactTemplateConfigSchema
7502
+ }).strict(),
7503
+ import_zod3.z.object({
7504
+ presetKey: import_zod3.z.literal("personal_authority_v1"),
7505
+ ...TemplateIdentityFields,
7506
+ config: PersonalAuthorityTemplateConfigSchema
7507
+ }).strict()
7508
+ ]);
7509
+ var UpdateArtifactTemplateInputSchema = import_zod3.z.object({
7510
+ name: TemplateIdentityFields.name.optional(),
7511
+ description: import_zod3.z.string().trim().max(500).optional(),
7512
+ config: ArtifactTemplateConfigSchema.optional(),
7513
+ authoringInstructions: TemplateIdentityFields.authoringInstructions.optional()
7514
+ }).strict().refine((input) => Object.keys(input).length > 0, "At least one field is required");
7515
+ var ArtifactTemplateVersionBase = {
7385
7516
  templateVersionId: import_zod3.z.string().uuid(),
7386
7517
  templateId: import_zod3.z.string().uuid(),
7387
7518
  version: import_zod3.z.number().int().positive(),
7388
- rendererKey: import_zod3.z.literal("editorial_reading_room_v1"),
7389
7519
  rendererVersion: import_zod3.z.literal(1),
7390
7520
  inputContractVersion: import_zod3.z.literal(1),
7391
- config: ArtifactTemplateConfigSchema,
7392
7521
  authoringInstructions: import_zod3.z.string().max(4e3),
7393
7522
  createdAt: import_zod3.z.string().datetime()
7394
- }).strict();
7523
+ };
7524
+ var ArtifactTemplateVersionSchema = import_zod3.z.discriminatedUnion("rendererKey", [
7525
+ import_zod3.z.object({ ...ArtifactTemplateVersionBase, rendererKey: import_zod3.z.literal("editorial_reading_room_v1"), config: EditorialArtifactTemplateConfigSchema }).strict(),
7526
+ import_zod3.z.object({ ...ArtifactTemplateVersionBase, rendererKey: import_zod3.z.literal("personal_authority_v1"), config: PersonalAuthorityTemplateConfigSchema }).strict()
7527
+ ]);
7395
7528
  var ArtifactTemplateSchema = import_zod3.z.object({
7396
7529
  templateId: import_zod3.z.string().uuid(),
7397
7530
  name: import_zod3.z.string().min(1).max(120),
@@ -7406,9 +7539,15 @@ var ArtifactTemplateSchema = import_zod3.z.object({
7406
7539
  var ListArtifactTemplatesResponseSchema = import_zod3.z.object({
7407
7540
  ok: import_zod3.z.literal(true),
7408
7541
  presets: import_zod3.z.array(import_zod3.z.object({
7409
- presetKey: import_zod3.z.literal("editorial_reading_room_v1"),
7542
+ presetKey: import_zod3.z.enum(["editorial_reading_room_v1", "personal_authority_v1"]),
7410
7543
  name: import_zod3.z.string(),
7411
7544
  description: import_zod3.z.string(),
7545
+ mark: import_zod3.z.string().min(1).max(4),
7546
+ featureFlags: import_zod3.z.array(import_zod3.z.object({
7547
+ key: import_zod3.z.string().min(1),
7548
+ label: import_zod3.z.string().min(1),
7549
+ description: import_zod3.z.string().min(1)
7550
+ }).strict()),
7412
7551
  defaultConfig: ArtifactTemplateConfigSchema
7413
7552
  }).strict()),
7414
7553
  templates: import_zod3.z.array(ArtifactTemplateSchema)
@@ -7423,7 +7562,7 @@ var ScheduledRunArtifactOutputSchema = import_zod3.z.object({
7423
7562
  artifactId: import_zod3.z.string().min(1).max(1e3),
7424
7563
  templateId: import_zod3.z.string().uuid(),
7425
7564
  templateVersionId: import_zod3.z.string().uuid(),
7426
- rendererKey: import_zod3.z.literal("editorial_reading_room_v1"),
7565
+ rendererKey: import_zod3.z.enum(["editorial_reading_room_v1", "personal_authority_v1"]),
7427
7566
  rendererVersion: import_zod3.z.literal(1),
7428
7567
  mimeType: import_zod3.z.literal("text/html"),
7429
7568
  title: import_zod3.z.string().min(1).max(300),
@@ -7475,18 +7614,29 @@ var GetScheduledRunResponseSchema = import_zod3.z.object({
7475
7614
  ok: import_zod3.z.literal(true),
7476
7615
  run: ScheduledRunResultSchema
7477
7616
  }).strict();
7478
- var InternalScheduledArtifactRenderRequestSchema = import_zod3.z.object({
7617
+ var InternalScheduledArtifactRenderRequestBase = {
7479
7618
  identity: import_zod3.z.string().min(1).max(320),
7480
7619
  ownerId: import_zod3.z.string().regex(/^[a-f0-9]{24}$/),
7481
7620
  runId: import_zod3.z.string().min(1).max(200),
7482
7621
  scheduleId: import_zod3.z.string().uuid(),
7483
7622
  templateId: import_zod3.z.string().uuid(),
7484
7623
  templateVersionId: import_zod3.z.string().uuid(),
7485
- rendererKey: import_zod3.z.literal("editorial_reading_room_v1"),
7486
- rendererVersion: import_zod3.z.literal(1),
7487
- config: ArtifactTemplateConfigSchema,
7488
- input: EditorialReadingRoomV1InputSchema
7489
- }).strict();
7624
+ rendererVersion: import_zod3.z.literal(1)
7625
+ };
7626
+ var InternalScheduledArtifactRenderRequestSchema = import_zod3.z.discriminatedUnion("rendererKey", [
7627
+ import_zod3.z.object({
7628
+ ...InternalScheduledArtifactRenderRequestBase,
7629
+ rendererKey: import_zod3.z.literal("editorial_reading_room_v1"),
7630
+ config: EditorialArtifactTemplateConfigSchema,
7631
+ input: EditorialReadingRoomV1InputSchema
7632
+ }).strict(),
7633
+ import_zod3.z.object({
7634
+ ...InternalScheduledArtifactRenderRequestBase,
7635
+ rendererKey: import_zod3.z.literal("personal_authority_v1"),
7636
+ config: PersonalAuthorityTemplateConfigSchema,
7637
+ input: PersonalAuthorityV1InputSchema
7638
+ }).strict()
7639
+ ]);
7490
7640
  var CreateScheduledRunViewLinkInputSchema = import_zod3.z.object({
7491
7641
  artifactId: import_zod3.z.string().min(1).max(1e3),
7492
7642
  expiresInDays: import_zod3.z.number().int().min(1).max(30).default(7)
@@ -8236,6 +8386,37 @@ var RenewEditorialReadingRoomDownloadOutputSchema = {
8236
8386
  downloadUrlExpiresAt: import_zod6.z.string(),
8237
8387
  expiresAt: import_zod6.z.string()
8238
8388
  };
8389
+ var CommonsPublicationSubdomainSchema = import_zod6.z.string().trim().min(3).max(50).describe("Requested publication name under transparent-commons.cc. The server normalizes spaces to hyphens, rejects reserved names, and enforces one globally unique name per account.");
8390
+ var CommonsPreparePublicationInputSchema = {
8391
+ requestedSubdomain: CommonsPublicationSubdomainSchema,
8392
+ title: import_zod6.z.string().trim().min(1).max(140).optional().describe("Reader-facing publication title. Omit to derive it from the chosen subdomain."),
8393
+ description: import_zod6.z.string().trim().max(500).optional().describe("Short description used on the publication archive and discovery surfaces.")
8394
+ };
8395
+ var CommonsValidatePublicationInputSchema = {
8396
+ operation: import_zod6.z.enum(["claim", "publish"]).describe("Validate either a new name claim or a finished editorial edition without writing."),
8397
+ requestedSubdomain: CommonsPublicationSubdomainSchema.optional().describe("Publication name to validate when operation is claim."),
8398
+ publicationSubdomain: CommonsPublicationSubdomainSchema.optional().describe("Already claimed publication name to validate when operation is publish."),
8399
+ title: import_zod6.z.string().trim().min(1).max(140).optional(),
8400
+ description: import_zod6.z.string().trim().max(500).optional(),
8401
+ edition: import_zod6.z.object(CreateEditorialReadingRoomInputSchema).strict().optional().describe("Complete source-grounded reading-room payload to validate when operation is publish."),
8402
+ editionSlug: import_zod6.z.string().trim().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).max(80).optional().describe("Stable public edition slug. Defaults to edition.site.slug."),
8403
+ baseRevision: import_zod6.z.number().int().positive().optional().describe("Current edition revision when validating an edit.")
8404
+ };
8405
+ var CommonsClaimPublicationInputSchema = {
8406
+ ...CommonsPreparePublicationInputSchema,
8407
+ idempotencyKey: import_zod6.z.string().trim().min(8).max(200).describe("Unique key for this intended claim. Reuse it only when retrying the same claim.")
8408
+ };
8409
+ var CommonsPublishEditorialInputSchema = {
8410
+ publicationSubdomain: CommonsPublicationSubdomainSchema.describe("Publication owned by the authenticated account."),
8411
+ editionSlug: import_zod6.z.string().trim().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).max(80).optional().describe("Stable public edition slug. Defaults to site.slug."),
8412
+ idempotencyKey: import_zod6.z.string().trim().min(8).max(200).describe("Unique key for this intended publish. Reuse it only when retrying the same revision."),
8413
+ baseRevision: import_zod6.z.number().int().positive().optional().describe("Required when revising an existing edition; use the current revision from commons_get_publication."),
8414
+ ...CreateEditorialReadingRoomInputSchema
8415
+ };
8416
+ var CommonsGetPublicationInputSchema = {
8417
+ subdomain: CommonsPublicationSubdomainSchema.optional().describe("Public publication name to inspect. Omit to return the publication owned by the authenticated account."),
8418
+ includeEditions: import_zod6.z.boolean().default(true).describe("Include the latest revision of every published edition.")
8419
+ };
8239
8420
  var RankTrackerModeSchema = import_zod6.z.enum(["maps", "organic", "ai_overview", "paa"]);
8240
8421
  var RankTrackerBlueprintInputSchema = {
8241
8422
  projectName: import_zod6.z.string().min(1).optional().describe("Optional name for the rank tracker project, client, or campaign."),
@@ -10955,6 +11136,41 @@ function registerPaaExtractorMcpTools(server, executor, options = {}) {
10955
11136
  openWorldHint: false
10956
11137
  }
10957
11138
  }, async (input) => executor.commonsListFilters(input));
11139
+ server.registerTool("commons_prepare_publication", {
11140
+ title: "Prepare Transparent Commons Publication",
11141
+ description: "Check and normalize a subscriber-chosen Transparent Commons publication name before any write. Returns name availability, the caller's existing publication, permanent URL shape, ownership rules, and the required validate/claim/publish workflow. This is for a user-owned editorial publication, not a neutral /wiki/ entity.",
11142
+ inputSchema: CommonsPreparePublicationInputSchema,
11143
+ outputSchema: recordOutputSchema("commons_prepare_publication", CommonsGenericOutputSchema),
11144
+ annotations: { title: "Prepare Transparent Commons Publication", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }
11145
+ }, async (input) => executor.commonsPreparePublication(input));
11146
+ server.registerTool("commons_validate_publication", {
11147
+ title: "Validate Transparent Commons Publication",
11148
+ 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.",
11149
+ inputSchema: CommonsValidatePublicationInputSchema,
11150
+ outputSchema: recordOutputSchema("commons_validate_publication", CommonsGenericOutputSchema),
11151
+ annotations: { title: "Validate Transparent Commons Publication", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }
11152
+ }, async (input) => executor.commonsValidatePublication(input));
11153
+ server.registerTool("commons_claim_publication", {
11154
+ title: "Claim Transparent Commons Publication",
11155
+ description: "Permanently claim one globally unique publication subdomain for the authenticated MCP Scraper account. Call commons_prepare_publication and commons_validate_publication first. This creates public identity state but does not publish an edition. Requires an idempotencyKey; retries with the same intended claim are safe.",
11156
+ inputSchema: CommonsClaimPublicationInputSchema,
11157
+ outputSchema: recordOutputSchema("commons_claim_publication", CommonsGenericOutputSchema),
11158
+ annotations: { title: "Claim Transparent Commons Publication", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true }
11159
+ }, async (input) => executor.commonsClaimPublication(input));
11160
+ server.registerTool("commons_publish_editorial", {
11161
+ title: "Publish Transparent Commons Editorial Edition",
11162
+ 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.",
11163
+ inputSchema: CommonsPublishEditorialInputSchema,
11164
+ outputSchema: recordOutputSchema("commons_publish_editorial", CommonsGenericOutputSchema),
11165
+ annotations: { title: "Publish Transparent Commons Editorial Edition", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true }
11166
+ }, async (input) => executor.commonsPublishEditorial(input));
11167
+ server.registerTool("commons_get_publication", {
11168
+ title: "Get Transparent Commons Publication",
11169
+ description: "Read a Transparent Commons publication and its latest edition revisions. Omit subdomain to inspect the caller-owned publication; pass a name to inspect a public publication. Returns the permanent public and archive URLs needed for sharing or later edits.",
11170
+ inputSchema: CommonsGetPublicationInputSchema,
11171
+ outputSchema: recordOutputSchema("commons_get_publication", CommonsGenericOutputSchema),
11172
+ annotations: { title: "Get Transparent Commons Publication", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }
11173
+ }, async (input) => executor.commonsGetPublication(input));
10958
11174
  server.registerTool("directory_workflow", {
10959
11175
  title: "Directory Workflow: Markets + Maps",
10960
11176
  description: `Start a durable directory/prospecting job: selects US city markets from versioned hosted Census-place data, optionally joins the active hosted ZIP dataset, then runs Google Maps business searches per city. Pass a new idempotencyKey for each intended job and reuse it only when retrying that call. Production does not read server-local location CSVs. Always returns a background jobId; poll with directory_workflow_status. ${fileBehavior("Saves a CSV of results per city.", "Completed jobs return an owner-scoped CSV artifact.")}`,
@@ -13946,13 +14162,14 @@ function renderInstallTerminal(options) {
13946
14162
  "1/1 install surfaces ready",
13947
14163
  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),
13948
14164
  "",
13949
- `${colorize("Tools", "cyan", color)} ${colorize("(215 MCP tools)", "muted", color)}`,
14165
+ `${colorize("Tools", "cyan", color)} ${colorize("(220 MCP tools)", "muted", color)}`,
13950
14166
  toolRow("search", ["harvest_paa", "search_serp", "maps_search", "maps_place_intel"], color),
13951
14167
  toolRow("extract", ["extract_url", "map_site_urls", "extract_site", "audit_site", "directory_workflow"], color),
13952
14168
  toolRow("build", ["create_editorial_reading_room", "rank_tracker_workflow", "portable HTML"], color),
13953
14169
  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),
13954
14170
  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),
13955
14171
  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),
14172
+ toolRow("commons", ["commons_search_entities", "commons_prepare_entity", "commons_submit_entity", "commons_prepare_publication", "commons_claim_publication", "commons_publish_editorial", "commons_get_publication"], color),
13956
14173
  toolRow("account", ["credits_info", "reports", "MCP resources"], color),
13957
14174
  toolRow("memory", ["memory-put", "memory-get", "memory-search", "list-vaults", "record-fact", "list-scheduled-actions"], color),
13958
14175
  `${colorize("Workflows", "cyan", color)} ${colorize("(MCP + CLI + API)", "muted", color)}`,
@@ -14130,40 +14347,40 @@ function annotations(title, readOnlyHint, destructiveHint = false, idempotentHin
14130
14347
  }
14131
14348
  function registerScheduledResultsMcpTools(server, executor) {
14132
14349
  server.registerTool("list_artifact_templates", {
14133
- title: "List Artifact Templates",
14134
- description: "List approved built-in artifact presets and saved immutable template versions. A preset must be saved before an automation can select it.",
14350
+ title: "List Templates",
14351
+ description: "List registered presentation presets and saved immutable template versions. A preset must be saved before an automation can select it.",
14135
14352
  inputSchema: import_zod10.z.object({
14136
14353
  status: import_zod10.z.enum(["active", "archived", "all"]).default("active")
14137
14354
  }).strict(),
14138
14355
  outputSchema: recordOutputSchema("list_artifact_templates", McpListArtifactTemplatesOutputSchema),
14139
- annotations: annotations("List Artifact Templates", true)
14356
+ annotations: annotations("List Templates", true)
14140
14357
  }, (input) => executor.call(
14141
14358
  `/artifact-templates?status=${encodeURIComponent(input.status)}`,
14142
14359
  ListArtifactTemplatesOutputSchema
14143
14360
  ));
14144
14361
  server.registerTool("get_artifact_template", {
14145
- title: "Get Artifact Template",
14146
- description: "Read one saved artifact template and its immutable version history.",
14362
+ title: "Get Template",
14363
+ description: "Read one saved template, its renderer family, configuration, and immutable version history.",
14147
14364
  inputSchema: import_zod10.z.object({ templateId: TemplateIdSchema }).strict(),
14148
14365
  outputSchema: recordOutputSchema("get_artifact_template", McpArtifactTemplateOutputSchema),
14149
- annotations: annotations("Get Artifact Template", true)
14366
+ annotations: annotations("Get Template", true)
14150
14367
  }, (input) => executor.call(
14151
14368
  `/artifact-templates/${encodeURIComponent(input.templateId)}`,
14152
14369
  ArtifactTemplateOutputSchema
14153
14370
  ));
14154
14371
  server.registerTool("create_artifact_template", {
14155
- title: "Save Artifact Template",
14156
- description: "Save the approved Editorial Reading Room preset as a user-owned template version 1. Arbitrary HTML, JavaScript, and executable code are not accepted.",
14372
+ title: "Create Template",
14373
+ description: "Create a user-owned template from a registered preset. Customize supported flags and presentation guidance; arbitrary executable code is not accepted.",
14157
14374
  inputSchema: CreateArtifactTemplateInputSchema,
14158
14375
  outputSchema: recordOutputSchema("create_artifact_template", McpArtifactTemplateOutputSchema),
14159
- annotations: annotations("Save Artifact Template", false)
14376
+ annotations: annotations("Create Template", false)
14160
14377
  }, (input) => executor.call("/artifact-templates", ArtifactTemplateOutputSchema, "POST", input));
14161
14378
  server.registerTool("update_artifact_template", {
14162
- title: "Create Artifact Template Version",
14163
- description: "Create the next immutable version of a saved artifact template. Existing automations remain pinned to their exact prior version until explicitly changed.",
14379
+ title: "Update Template",
14380
+ description: "Create the next immutable version of a saved template. Existing automations remain pinned to their exact prior version until explicitly changed.",
14164
14381
  inputSchema: UpdateArtifactTemplateToolInputSchema,
14165
14382
  outputSchema: recordOutputSchema("update_artifact_template", McpArtifactTemplateOutputSchema),
14166
- annotations: annotations("Create Artifact Template Version", false)
14383
+ annotations: annotations("Update Template", false)
14167
14384
  }, (input) => {
14168
14385
  const { templateId, ...body } = input;
14169
14386
  UpdateArtifactTemplateInputSchema.parse(body);
@@ -14175,14 +14392,14 @@ function registerScheduledResultsMcpTools(server, executor) {
14175
14392
  );
14176
14393
  });
14177
14394
  server.registerTool("archive_artifact_template", {
14178
- title: "Archive Artifact Template",
14395
+ title: "Archive Template",
14179
14396
  description: "Archive or restore a saved template without deleting its immutable versions. Existing pinned automations continue to work.",
14180
14397
  inputSchema: import_zod10.z.object({
14181
14398
  templateId: TemplateIdSchema,
14182
14399
  archived: import_zod10.z.boolean()
14183
14400
  }).strict(),
14184
14401
  outputSchema: recordOutputSchema("archive_artifact_template", McpArtifactTemplateOutputSchema),
14185
- annotations: annotations("Archive Artifact Template", false, false, true)
14402
+ annotations: annotations("Archive Template", false, false, true)
14186
14403
  }, (input) => executor.call(
14187
14404
  `/artifact-templates/${encodeURIComponent(input.templateId)}/${input.archived ? "archive" : "restore"}`,
14188
14405
  ArtifactTemplateOutputSchema,