mcp-scraper 0.69.0 → 0.72.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 (45) hide show
  1. package/CHANGELOG.md +60 -2
  2. package/README.md +6 -2
  3. package/dist/{analytics-repository-62CAZAIP.js → analytics-repository-6YLRSWYO.js} +3 -2
  4. package/dist/bin/api-server.cjs +18592 -12680
  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.js +1 -1
  8. package/dist/bin/mcp-scraper-install.cjs +3 -3
  9. package/dist/bin/mcp-scraper-install.js +2 -2
  10. package/dist/bin/mcp-stdio-server.cjs +10492 -9129
  11. package/dist/bin/mcp-stdio-server.js +9 -7
  12. package/dist/bin/paa-harvest.cjs +308 -41
  13. package/dist/bin/paa-harvest.js +4 -3
  14. package/dist/{chunk-M7D7WO75.js → chunk-2N4V4LVU.js} +3178 -2019
  15. package/dist/chunk-7RQULQF3.js +263 -0
  16. package/dist/{chunk-UL4ZKAWZ.js → chunk-A66DGFOU.js} +1 -1
  17. package/dist/{chunk-ES25GP6C.js → chunk-CXY5WV45.js} +24 -34
  18. package/dist/{chunk-Y46YNQMM.js → chunk-F5TK4KMT.js} +1 -1
  19. package/dist/{chunk-62LEXS5O.js → chunk-F6MUGMRN.js} +306 -44
  20. package/dist/{chunk-5RFQGIYC.js → chunk-FVL4GUTP.js} +2 -2
  21. package/dist/{chunk-OZIUFN6B.js → chunk-I45JV4EU.js} +2 -2
  22. package/dist/{chunk-2LXTOAKS.js → chunk-KIPIBPUB.js} +9 -1
  23. package/dist/chunk-MB72PA6S.js +2003 -0
  24. package/dist/chunk-OM7HVEJ3.js +26 -0
  25. package/dist/chunk-PJEEKOUM.js +404 -0
  26. package/dist/{chunk-RX2QAHML.js → chunk-RAFQEPJ4.js} +2 -2
  27. package/dist/{chunk-KO5CK5ZT.js → chunk-SR7GSLEA.js} +202 -441
  28. package/dist/chunk-T3MZISOF.js +240 -0
  29. package/dist/{chunk-ULYOCJUJ.js → chunk-TUTQHP4O.js} +1 -1
  30. package/dist/{chunk-65FTMB7G.js → chunk-WEFPBAAG.js} +180 -9
  31. package/dist/{chunk-LN6N3YLK.js → chunk-WFQ2E4WE.js} +1 -1
  32. package/dist/{db-ZGZAKYBW.js → db-566MOHHD.js} +7 -1
  33. package/dist/{extract-bundle-SXSJCPQI.js → extract-bundle-337ZDIIQ.js} +4 -4
  34. package/dist/gmail-service-E276SBJU.js +25 -0
  35. package/dist/index.cjs +322 -49
  36. package/dist/index.d.cts +15 -2
  37. package/dist/index.d.ts +15 -2
  38. package/dist/index.js +4 -3
  39. package/dist/{lead-list-enrichment-repository-CXLVIV3R.js → lead-list-enrichment-repository-WWEMJ7EN.js} +2 -2
  40. package/dist/{location-data-repository-G72M7DTN.js → location-data-repository-H4B2BWGY.js} +2 -2
  41. package/dist/{server-WCNYXILA.js → server-UGWC5YMD.js} +8376 -6616
  42. package/dist/{site-extract-repository-RLB3TFJ3.js → site-extract-repository-ACNAVNDN.js} +3 -3
  43. package/dist/{worker-KHSJG365.js → worker-JQORPCFQ.js} +9 -7
  44. package/package.json +1 -1
  45. package/dist/chunk-2L4C4DAZ.js +0 -103
@@ -28,10 +28,10 @@ import {
28
28
  setExtractJobTotal,
29
29
  settleExtractJob,
30
30
  terminalExtractJobStatus
31
- } from "./chunk-OZIUFN6B.js";
31
+ } from "./chunk-I45JV4EU.js";
32
32
  import "./chunk-DNM65UCK.js";
33
- import "./chunk-5RFQGIYC.js";
34
- import "./chunk-65FTMB7G.js";
33
+ import "./chunk-FVL4GUTP.js";
34
+ import "./chunk-WEFPBAAG.js";
35
35
  export {
36
36
  abandonExtractSettlement,
37
37
  claimFailedExtractJobForRefinalize,
@@ -5,24 +5,26 @@ import {
5
5
  harvestProblemEnvelope,
6
6
  harvestProblemResponse,
7
7
  serializeHarvestProblem
8
- } from "./chunk-2LXTOAKS.js";
8
+ } from "./chunk-KIPIBPUB.js";
9
9
  import "./chunk-OZJMVCDK.js";
10
10
  import {
11
11
  harvest
12
- } from "./chunk-62LEXS5O.js";
12
+ } from "./chunk-F6MUGMRN.js";
13
13
  import {
14
14
  sanitizeAttempts,
15
15
  sanitizeHarvestResult
16
- } from "./chunk-2L4C4DAZ.js";
16
+ } from "./chunk-7RQULQF3.js";
17
+ import {
18
+ browserServiceApiKey
19
+ } from "./chunk-OM7HVEJ3.js";
17
20
  import {
18
- browserServiceApiKey,
19
21
  runWithCostContext
20
- } from "./chunk-ES25GP6C.js";
22
+ } from "./chunk-CXY5WV45.js";
21
23
  import "./chunk-77LQV73B.js";
22
24
  import {
23
25
  MC_COSTS,
24
26
  serpActualCostMc
25
- } from "./chunk-5RFQGIYC.js";
27
+ } from "./chunk-FVL4GUTP.js";
26
28
  import {
27
29
  claimPendingJob,
28
30
  completeJob,
@@ -30,7 +32,7 @@ import {
30
32
  debitMc,
31
33
  failJob,
32
34
  listHarvestAttempts
33
- } from "./chunk-65FTMB7G.js";
35
+ } from "./chunk-WEFPBAAG.js";
34
36
 
35
37
  // src/api/worker.ts
36
38
  var MAX_CONCURRENT = 2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-scraper",
3
- "version": "0.69.0",
3
+ "version": "0.72.0",
4
4
  "description": "MCP server for MCP Scraper web intelligence tools",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -1,103 +0,0 @@
1
- import {
2
- publicErrorMessage,
3
- sanitizeVendorName
4
- } from "./chunk-65FTMB7G.js";
5
-
6
- // src/api/outbound-sanitize.ts
7
- var KEY_RENAMES = {
8
- kernel: "browserRuntime"
9
- };
10
- var ERROR_VALUE_KEYS = /error|message/i;
11
- var PRIVATE_UPSTREAM_FAILURE = /(?:spending|billing|organization|account).{0,80}(?:cap|limit|blocked|disabled)|(?:quota|capacity).{0,40}(?:reached|exceeded)|https?:\/\/\S*(?:dashboard|onkernel)/i;
12
- var PRIVATE_RUNTIME_FAILURE = /\b(?:ENOENT|ENOTDIR|EACCES|EPERM|EISDIR|EMFILE|ENFILE)\b|\b(?:mkdir|open|stat|lstat|readFile|writeFile)\s+['"]?(?:\/|[A-Za-z]:\\)|(?:^|[\s'"])(?:\/Users|\/home|\/tmp|\/var|\/private|\/opt|\/srv|\/root)\//i;
13
- var INTERNAL_DIAGNOSTIC_KEYS = /* @__PURE__ */ new Set([
14
- "kernel_session_id",
15
- "browser_session_id",
16
- "kernelSessionId",
17
- "browserSessionId",
18
- "sessionId",
19
- "kernel_delete_started",
20
- "session_cleanup_started",
21
- "kernelDeleteStarted",
22
- "sessionCleanupStarted",
23
- "kernel_delete_succeeded",
24
- "session_cleanup_succeeded",
25
- "kernelDeleteSucceeded",
26
- "sessionCleanupSucceeded",
27
- "kernel_delete_error",
28
- "session_cleanup_error",
29
- "kernelDeleteError",
30
- "sessionCleanupError",
31
- "kernelProxyId",
32
- "proxyId",
33
- "requestedProxyIdSuffix",
34
- "retrievedProxyIdSuffix",
35
- "provider",
36
- "providerName",
37
- "service",
38
- "serviceName",
39
- "vendor",
40
- "vendorName",
41
- "organization",
42
- "organizationId",
43
- "accountId"
44
- ]);
45
- var VENDOR_URL_KEYS = /* @__PURE__ */ new Set([
46
- "hosted_url",
47
- "hostedUrl",
48
- "live_view_url",
49
- "liveViewUrl",
50
- "cdp_ws_url",
51
- "cdpWsUrl",
52
- "browser_live_view_url"
53
- ]);
54
- var VENDOR_URL_RE = /\b(?:wss?|https?):\/\/[^\s"'<>]*\bonkernel\.com[^\s"'<>]*/gi;
55
- function redactVendorUrls(value) {
56
- return value.replace(VENDOR_URL_RE, "[browser-service]");
57
- }
58
- function sanitizeOutboundDiagnostics(value, parentKey = "") {
59
- if (typeof value === "string") {
60
- let out = redactVendorUrls(value);
61
- if (ERROR_VALUE_KEYS.test(parentKey) && (PRIVATE_UPSTREAM_FAILURE.test(value) || PRIVATE_RUNTIME_FAILURE.test(value))) {
62
- out = publicErrorMessage("service_unavailable");
63
- } else if (ERROR_VALUE_KEYS.test(parentKey)) {
64
- out = sanitizeVendorName(out);
65
- }
66
- return out;
67
- }
68
- if (Array.isArray(value)) return value.map((v) => sanitizeOutboundDiagnostics(v, parentKey));
69
- if (value !== null && typeof value === "object") {
70
- const out = {};
71
- for (const [key, val] of Object.entries(value)) {
72
- if (INTERNAL_DIAGNOSTIC_KEYS.has(key)) continue;
73
- const renamed = KEY_RENAMES[key] ?? key;
74
- if (VENDOR_URL_KEYS.has(key)) {
75
- out[renamed] = null;
76
- continue;
77
- }
78
- out[renamed] = sanitizeOutboundDiagnostics(val, key);
79
- }
80
- return out;
81
- }
82
- return value;
83
- }
84
- function sanitizeAttempts(attempts) {
85
- return attempts.map((a) => sanitizeOutboundDiagnostics(a));
86
- }
87
- function sanitizeHarvestResult(result) {
88
- const diagnostics = result?.diagnostics;
89
- if (!diagnostics?.debug) return result;
90
- return {
91
- ...result,
92
- diagnostics: {
93
- ...diagnostics,
94
- debug: sanitizeOutboundDiagnostics(diagnostics.debug)
95
- }
96
- };
97
- }
98
-
99
- export {
100
- sanitizeOutboundDiagnostics,
101
- sanitizeAttempts,
102
- sanitizeHarvestResult
103
- };