mcp-scraper 0.38.2 → 0.40.1

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 (111) hide show
  1. package/README.md +5 -2
  2. package/package.json +5 -6
  3. package/dist/bin/api-server.cjs +0 -58752
  4. package/dist/bin/api-server.cjs.map +0 -1
  5. package/dist/bin/api-server.d.cts +0 -1
  6. package/dist/bin/api-server.d.ts +0 -1
  7. package/dist/bin/api-server.js +0 -38
  8. package/dist/bin/api-server.js.map +0 -1
  9. package/dist/bin/mcp-scraper-cli.cjs +0 -2671
  10. package/dist/bin/mcp-scraper-cli.cjs.map +0 -1
  11. package/dist/bin/mcp-scraper-cli.d.cts +0 -1
  12. package/dist/bin/mcp-scraper-cli.d.ts +0 -1
  13. package/dist/bin/mcp-scraper-cli.js +0 -742
  14. package/dist/bin/mcp-scraper-cli.js.map +0 -1
  15. package/dist/bin/mcp-scraper-install.cjs +0 -129
  16. package/dist/bin/mcp-scraper-install.cjs.map +0 -1
  17. package/dist/bin/mcp-scraper-install.d.cts +0 -1
  18. package/dist/bin/mcp-scraper-install.d.ts +0 -1
  19. package/dist/bin/mcp-scraper-install.js +0 -27
  20. package/dist/bin/mcp-scraper-install.js.map +0 -1
  21. package/dist/bin/mcp-stdio-server.cjs +0 -12264
  22. package/dist/bin/mcp-stdio-server.cjs.map +0 -1
  23. package/dist/bin/mcp-stdio-server.d.cts +0 -1
  24. package/dist/bin/mcp-stdio-server.d.ts +0 -1
  25. package/dist/bin/mcp-stdio-server.js +0 -135
  26. package/dist/bin/mcp-stdio-server.js.map +0 -1
  27. package/dist/bin/paa-harvest.cjs +0 -3808
  28. package/dist/bin/paa-harvest.cjs.map +0 -1
  29. package/dist/bin/paa-harvest.d.cts +0 -1
  30. package/dist/bin/paa-harvest.d.ts +0 -1
  31. package/dist/bin/paa-harvest.js +0 -44
  32. package/dist/bin/paa-harvest.js.map +0 -1
  33. package/dist/chunk-345BQXZH.js +0 -712
  34. package/dist/chunk-345BQXZH.js.map +0 -1
  35. package/dist/chunk-44HZLHDV.js +0 -52
  36. package/dist/chunk-44HZLHDV.js.map +0 -1
  37. package/dist/chunk-AZRPG43B.js +0 -617
  38. package/dist/chunk-AZRPG43B.js.map +0 -1
  39. package/dist/chunk-CB5C3BPB.js +0 -135
  40. package/dist/chunk-CB5C3BPB.js.map +0 -1
  41. package/dist/chunk-EGJKUB4Q.js +0 -276
  42. package/dist/chunk-EGJKUB4Q.js.map +0 -1
  43. package/dist/chunk-FQI5PFE7.js +0 -1866
  44. package/dist/chunk-FQI5PFE7.js.map +0 -1
  45. package/dist/chunk-FRYT3ID4.js +0 -684
  46. package/dist/chunk-FRYT3ID4.js.map +0 -1
  47. package/dist/chunk-G3P3ZDB4.js +0 -69
  48. package/dist/chunk-G3P3ZDB4.js.map +0 -1
  49. package/dist/chunk-K443GQY5.js +0 -24
  50. package/dist/chunk-K443GQY5.js.map +0 -1
  51. package/dist/chunk-N7KUTTCC.js +0 -3007
  52. package/dist/chunk-N7KUTTCC.js.map +0 -1
  53. package/dist/chunk-NGM237OO.js +0 -3410
  54. package/dist/chunk-NGM237OO.js.map +0 -1
  55. package/dist/chunk-NKCCGADE.js +0 -11285
  56. package/dist/chunk-NKCCGADE.js.map +0 -1
  57. package/dist/chunk-NNW3O6ZD.js +0 -108
  58. package/dist/chunk-NNW3O6ZD.js.map +0 -1
  59. package/dist/chunk-QZXKQB7Y.js +0 -414
  60. package/dist/chunk-QZXKQB7Y.js.map +0 -1
  61. package/dist/chunk-SFRMFGQ6.js +0 -158
  62. package/dist/chunk-SFRMFGQ6.js.map +0 -1
  63. package/dist/chunk-YCI2PNCS.js +0 -499
  64. package/dist/chunk-YCI2PNCS.js.map +0 -1
  65. package/dist/chunk-YODBNTTN.js +0 -7
  66. package/dist/chunk-YODBNTTN.js.map +0 -1
  67. package/dist/db-C5KVCOYT.js +0 -239
  68. package/dist/db-C5KVCOYT.js.map +0 -1
  69. package/dist/extract-bundle-KUBX6N6Z.js +0 -568
  70. package/dist/extract-bundle-KUBX6N6Z.js.map +0 -1
  71. package/dist/index.cjs +0 -4160
  72. package/dist/index.cjs.map +0 -1
  73. package/dist/index.d.cts +0 -413
  74. package/dist/index.d.ts +0 -413
  75. package/dist/index.js +0 -338
  76. package/dist/index.js.map +0 -1
  77. package/dist/location-data-repository-TTWF3OTM.js +0 -35
  78. package/dist/location-data-repository-TTWF3OTM.js.map +0 -1
  79. package/dist/server-5EX6XBIA.js +0 -33596
  80. package/dist/server-5EX6XBIA.js.map +0 -1
  81. package/dist/site-extract-repository-XSPJTCIL.js +0 -62
  82. package/dist/site-extract-repository-XSPJTCIL.js.map +0 -1
  83. package/dist/worker-XCPU4YSN.js +0 -142
  84. package/dist/worker-XCPU4YSN.js.map +0 -1
  85. package/docs/adr/0001-in-page-graphql-interception-for-anti-bot-scraping.md +0 -58
  86. package/docs/adr/0002-hybrid-smart-rag-vault-retrieval.md +0 -62
  87. package/docs/adr/0003-waive-unrecoverable-scheduled-model-cost.md +0 -22
  88. package/docs/adr/README.md +0 -13
  89. package/docs/final-tooling-spec.md +0 -206
  90. package/docs/hosted-location-data.md +0 -108
  91. package/docs/kernel-proxy-future-enhancements.md +0 -80
  92. package/docs/mcp-tool-craft-lint.generated.md +0 -183
  93. package/docs/mcp-tool-design-guide.md +0 -225
  94. package/docs/mcp-tool-manifest.generated.json +0 -22871
  95. package/docs/mcp-tool-quality-spec.md +0 -240
  96. package/docs/oauth-legal-review.md +0 -38
  97. package/docs/seo-crawl-report-spec.md +0 -287
  98. package/docs/specs/api-forge-spec.md +0 -234
  99. package/docs/specs/connected-services-control-plane-decoupling-spec.md +0 -1044
  100. package/docs/specs/deferred-work-spec.md +0 -86
  101. package/docs/specs/google-drive-bulk-access-and-mcp-schema-passthrough-spec.md +0 -1689
  102. package/docs/specs/kernel-stealth-captcha-test-matrix.md +0 -278
  103. package/docs/specs/main-mcp-integration-ownership-spec.md +0 -1164
  104. package/docs/specs/mcp-tool-definition-quality-audit-spec.md +0 -1602
  105. package/docs/specs/meta-ad-creative-media-resolution-spec.md +0 -31
  106. package/docs/specs/multimodal-image-memory-architecture-spec.md +0 -1022
  107. package/docs/specs/oauth-mcp-spec.md +0 -213
  108. package/docs/specs/query-fanout-transport-contract-fix.md +0 -45
  109. package/docs/specs/relationship-workspace-ai-behavior-plan.md +0 -26
  110. package/docs/specs/unified-credit-and-scheduled-execution-billing-spec.md +0 -995
  111. package/docs/tool-catalog-spec.md +0 -388
package/dist/index.d.cts DELETED
@@ -1,413 +0,0 @@
1
- import { z } from 'zod';
2
-
3
- declare const HarvestOptionsSchema: z.ZodObject<{
4
- query: z.ZodString;
5
- location: z.ZodOptional<z.ZodString>;
6
- gl: z.ZodDefault<z.ZodString>;
7
- hl: z.ZodDefault<z.ZodString>;
8
- device: z.ZodDefault<z.ZodEnum<["desktop", "mobile"]>>;
9
- proxyMode: z.ZodDefault<z.ZodEnum<["location", "configured", "none"]>>;
10
- proxyZip: z.ZodOptional<z.ZodString>;
11
- keepDefaultProxy: z.ZodOptional<z.ZodBoolean>;
12
- requireUsEgress: z.ZodOptional<z.ZodBoolean>;
13
- maxAttempts: z.ZodOptional<z.ZodNumber>;
14
- debug: z.ZodDefault<z.ZodBoolean>;
15
- depth: z.ZodDefault<z.ZodNumber>;
16
- maxQuestions: z.ZodDefault<z.ZodNumber>;
17
- headless: z.ZodDefault<z.ZodBoolean>;
18
- profileDir: z.ZodOptional<z.ZodString>;
19
- proxy: z.ZodOptional<z.ZodString>;
20
- kernelApiKey: z.ZodOptional<z.ZodString>;
21
- kernelProxyId: z.ZodOptional<z.ZodString>;
22
- kernelProxyResolution: z.ZodOptional<z.ZodUnknown>;
23
- outputDir: z.ZodDefault<z.ZodString>;
24
- format: z.ZodDefault<z.ZodEnum<["json", "csv", "both"]>>;
25
- serpOnly: z.ZodDefault<z.ZodBoolean>;
26
- pages: z.ZodDefault<z.ZodNumber>;
27
- recency: z.ZodOptional<z.ZodEnum<["day", "week", "month", "year"]>>;
28
- softDeadlineMs: z.ZodOptional<z.ZodNumber>;
29
- }, "strip", z.ZodTypeAny, {
30
- query: string;
31
- gl: string;
32
- hl: string;
33
- device: "desktop" | "mobile";
34
- proxyMode: "none" | "location" | "configured";
35
- debug: boolean;
36
- depth: number;
37
- maxQuestions: number;
38
- headless: boolean;
39
- outputDir: string;
40
- format: "json" | "csv" | "both";
41
- serpOnly: boolean;
42
- pages: number;
43
- location?: string | undefined;
44
- proxyZip?: string | undefined;
45
- keepDefaultProxy?: boolean | undefined;
46
- requireUsEgress?: boolean | undefined;
47
- maxAttempts?: number | undefined;
48
- profileDir?: string | undefined;
49
- proxy?: string | undefined;
50
- kernelApiKey?: string | undefined;
51
- kernelProxyId?: string | undefined;
52
- kernelProxyResolution?: unknown;
53
- recency?: "day" | "week" | "month" | "year" | undefined;
54
- softDeadlineMs?: number | undefined;
55
- }, {
56
- query: string;
57
- location?: string | undefined;
58
- gl?: string | undefined;
59
- hl?: string | undefined;
60
- device?: "desktop" | "mobile" | undefined;
61
- proxyMode?: "none" | "location" | "configured" | undefined;
62
- proxyZip?: string | undefined;
63
- keepDefaultProxy?: boolean | undefined;
64
- requireUsEgress?: boolean | undefined;
65
- maxAttempts?: number | undefined;
66
- debug?: boolean | undefined;
67
- depth?: number | undefined;
68
- maxQuestions?: number | undefined;
69
- headless?: boolean | undefined;
70
- profileDir?: string | undefined;
71
- proxy?: string | undefined;
72
- kernelApiKey?: string | undefined;
73
- kernelProxyId?: string | undefined;
74
- kernelProxyResolution?: unknown;
75
- outputDir?: string | undefined;
76
- format?: "json" | "csv" | "both" | undefined;
77
- serpOnly?: boolean | undefined;
78
- pages?: number | undefined;
79
- recency?: "day" | "week" | "month" | "year" | undefined;
80
- softDeadlineMs?: number | undefined;
81
- }>;
82
-
83
- type CanonicalLocationName = string;
84
- type SerpDevice = 'desktop' | 'mobile';
85
- type ProxyMode = 'location' | 'configured' | 'none';
86
- interface KernelLocationProxyTarget {
87
- canonicalLocation: CanonicalLocationName;
88
- level: 'zip' | 'city' | 'state';
89
- country: 'US';
90
- state: string;
91
- city: string;
92
- zip?: string;
93
- cityCandidates: string[];
94
- proxyName: string;
95
- config: {
96
- country: 'US';
97
- state: string;
98
- city?: string;
99
- zip?: string;
100
- };
101
- }
102
- type KernelProxyResolutionSource = 'disabled' | 'location_reused' | 'location_created' | 'isp_created' | 'backup_custom' | 'configured_fallback' | 'unavailable';
103
- interface KernelProxyResolutionDebug {
104
- source: KernelProxyResolutionSource;
105
- proxyType: string;
106
- proxyMode: ProxyMode;
107
- proxyIdPresent: boolean;
108
- proxyIdSuffix: string | null;
109
- target: KernelLocationProxyTarget | null;
110
- error: string | null;
111
- disposable?: boolean;
112
- }
113
- interface HarvestStats {
114
- seed: string;
115
- totalQuestions: number;
116
- maxDepthReached: number;
117
- durationMs: number;
118
- errorCount: number;
119
- }
120
- type HarvestCompletionStatus = 'paa_found' | 'no_paa' | 'serp_only';
121
- /**
122
- * A completed browser attempt can still be unsuitable for programmatic use.
123
- * This is deliberately separate from completionStatus so a valid no-PAA
124
- * response with organic results is not confused with an unreadable SERP.
125
- */
126
- type HarvestResultQuality = 'complete' | 'partial' | 'degraded';
127
- type HarvestDegradationReason = 'empty_primary_serp';
128
- type HarvestDiagnosticWarningCode = 'short_videos_captcha_skipped';
129
- type HarvestDiagnosticWarningSurface = 'short_videos';
130
- interface HarvestDiagnosticWarning {
131
- code: HarvestDiagnosticWarningCode;
132
- surface: HarvestDiagnosticWarningSurface;
133
- message: string;
134
- retryable: boolean;
135
- }
136
- interface HarvestCompleteness {
137
- paaWithoutAnswer: number;
138
- paaWithoutSource: number;
139
- paaAnswersRecovered: number;
140
- aioShareCaptured: boolean | null;
141
- }
142
- interface HarvestDiagnostics {
143
- completionStatus: HarvestCompletionStatus;
144
- problem: null;
145
- resultQuality?: HarvestResultQuality;
146
- degradedResult?: boolean;
147
- degradationReasons?: HarvestDegradationReason[];
148
- retryRecommended?: boolean;
149
- warnings?: HarvestDiagnosticWarning[];
150
- completeness?: HarvestCompleteness;
151
- debug?: HarvestDebugSnapshot;
152
- }
153
- interface BrowserNetworkLocationDebug {
154
- source: 'ipapi.co' | 'ipwho.is' | 'api64.ipify.org';
155
- ip: string | null;
156
- city: string | null;
157
- region: string | null;
158
- country: string | null;
159
- org: string | null;
160
- timezone: string | null;
161
- error: string | null;
162
- }
163
- interface KernelSessionDebug {
164
- sessionId: string | null;
165
- proxyMode: ProxyMode;
166
- requestedProxyIdPresent: boolean;
167
- requestedProxyIdSuffix: string | null;
168
- createdProxyIdPresent: boolean | null;
169
- createdProxyIdSuffix: string | null;
170
- retrievedProxyIdPresent: boolean | null;
171
- retrievedProxyIdSuffix: string | null;
172
- retrievedProxyIdMatchesRequested: boolean | null;
173
- defaultProxyDisabled: boolean | null;
174
- defaultProxyDisableError: string | null;
175
- proxyResolution: KernelProxyResolutionDebug | null;
176
- timeoutSeconds: number | null;
177
- stealth: boolean | null;
178
- profilePresent: boolean | null;
179
- poolPresent: boolean | null;
180
- retrieveError: string | null;
181
- }
182
- interface BrowserContextDebug {
183
- viewport: {
184
- width: number;
185
- height: number;
186
- };
187
- locale: string;
188
- device: SerpDevice;
189
- userAgent: string;
190
- deviceScaleFactor: number | null;
191
- isMobile: boolean;
192
- hasTouch: boolean;
193
- }
194
- interface SerpNavigationDebug {
195
- requestedUrl: string;
196
- finalUrl: string | null;
197
- title: string | null;
198
- bodySnippet: string | null;
199
- hasPaa: boolean | null;
200
- captchaDetected: boolean | null;
201
- googleSorryUrl: boolean | null;
202
- redirected: boolean | null;
203
- }
204
- interface BrowserDebugSnapshot {
205
- kernel: KernelSessionDebug | null;
206
- context: BrowserContextDebug | null;
207
- networkLocation: BrowserNetworkLocationDebug | null;
208
- serpNavigation: SerpNavigationDebug | null;
209
- }
210
- interface SerpLocationCandidate {
211
- city: string;
212
- regionCode: string;
213
- count: number;
214
- examples: string[];
215
- }
216
- interface SerpLocationEvidence {
217
- status: 'not_requested' | 'matched' | 'mismatch' | 'unknown';
218
- expected: {
219
- city: string;
220
- regionCode: string | null;
221
- canonicalLocation: string;
222
- } | null;
223
- candidates: SerpLocationCandidate[];
224
- }
225
- interface HarvestDebugSnapshot {
226
- enabled: true;
227
- request: {
228
- query: string;
229
- locationInput: string | null;
230
- canonicalLocation: string | null;
231
- uule: string | null;
232
- gl: string;
233
- hl: string;
234
- device: SerpDevice;
235
- proxyMode: ProxyMode;
236
- proxyZip: string | null;
237
- serpOnly: boolean;
238
- pages: number;
239
- };
240
- browser: BrowserDebugSnapshot;
241
- locationEvidence?: SerpLocationEvidence;
242
- }
243
- interface PAANode {
244
- question: string;
245
- answer: string | null;
246
- sourceTitle: string | null;
247
- sourceSite: string | null;
248
- sourceCite: string | null;
249
- depth: number;
250
- parentQuestion: string | null;
251
- children: PAANode[];
252
- }
253
- interface FlatRow {
254
- seed_query: string;
255
- question: string;
256
- answer: string;
257
- source_title: string;
258
- source_site: string;
259
- source_cite: string;
260
- depth: number;
261
- parent_question: string;
262
- extracted_at: string;
263
- }
264
- interface VideoResult {
265
- type: 'video' | 'short_video';
266
- title: string;
267
- channel: string;
268
- platform: string;
269
- duration: string;
270
- url: string;
271
- }
272
- interface ForumResult {
273
- title: string;
274
- source: string;
275
- url: string;
276
- }
277
- interface WhatPeopleSayingCard {
278
- type: 'reddit' | 'facebook' | 'instagram' | 'tiktok' | 'youtube' | 'news' | 'unknown';
279
- title: string;
280
- url: string;
281
- source: string;
282
- platform: string;
283
- popularComment: string | null;
284
- engagement: string;
285
- date: string;
286
- duration: string | null;
287
- authorNote: string | null;
288
- }
289
- interface AICitation {
290
- text: string;
291
- href: string;
292
- }
293
- interface AIOverviewResult {
294
- detected: boolean;
295
- text: string | null;
296
- citations: AICitation[];
297
- expanded?: boolean;
298
- fullyExpanded?: boolean;
299
- sections?: string[];
300
- shareUrl?: string | null;
301
- }
302
- interface AIModeResult {
303
- detected: boolean;
304
- text: string | null;
305
- citations: AICitation[];
306
- }
307
- type GoogleSurface = 'web' | 'aim' | 'unknown';
308
- interface OrganicResult {
309
- position: number;
310
- title: string;
311
- url: string;
312
- domain: string;
313
- cite: string | null;
314
- snippet: string | null;
315
- isRedditStyle: boolean;
316
- inlineRating: {
317
- value: string;
318
- count: string;
319
- } | null;
320
- }
321
- interface LocalPackBusiness {
322
- position: number;
323
- name: string;
324
- cid: string | null;
325
- rating: string | null;
326
- reviewCount: string | null;
327
- metadata: string[];
328
- websiteUrl: string | null;
329
- directionsUrl: string | null;
330
- }
331
- interface EntityRecord {
332
- name: string;
333
- kgId: string | null;
334
- cid: string | null;
335
- gcid: string | null;
336
- }
337
- interface EntityIds {
338
- entities: EntityRecord[];
339
- kgIds: string[];
340
- cids: string[];
341
- gcids: string[];
342
- }
343
- interface HarvestResult {
344
- seed: string;
345
- location: string | null;
346
- extractedAt: string;
347
- diagnostics: HarvestDiagnostics;
348
- totalQuestions: number;
349
- surface: GoogleSurface;
350
- aiOverview: AIOverviewResult;
351
- aiMode: AIModeResult;
352
- whatPeopleSaying: WhatPeopleSayingCard[];
353
- tree: PAANode[];
354
- flat: FlatRow[];
355
- videos: VideoResult[];
356
- forums: ForumResult[];
357
- organicResults: OrganicResult[];
358
- localPack: LocalPackBusiness[];
359
- entityIds: EntityIds;
360
- stats: HarvestStats;
361
- }
362
- type HarvestOptions = z.infer<typeof HarvestOptionsSchema>;
363
-
364
- declare function harvest(rawOptions: unknown): Promise<HarvestResult>;
365
-
366
- interface EpisodeBrief {
367
- episodeNumber: number;
368
- episodeCount: number;
369
- slug: string;
370
- sectionTitle: string;
371
- storyMoment: string;
372
- characterName: string;
373
- clip1: string;
374
- clip2: string;
375
- voiceover: string;
376
- audioMood: string;
377
- depositionVisualTell: string;
378
- continuityNote: string;
379
- }
380
-
381
- interface ClipPairOptions {
382
- resolution?: '480p' | '720p' | '1080p';
383
- aspectRatio?: '16:9' | '9:16' | '1:1';
384
- clipDurationSeconds?: number;
385
- generateAudio?: boolean;
386
- seed?: number;
387
- outputDir?: string;
388
- }
389
- interface ClipPairResult {
390
- clip1Url: string;
391
- clip2Url: string;
392
- finalVideoPath: string;
393
- seed: number;
394
- promptClip1: string;
395
- promptClip2: string;
396
- voiceover: string;
397
- audioMood: string;
398
- }
399
- declare class VideoGenerator {
400
- constructor(apiKey?: string);
401
- generateClipPair(question: string, answer: string, opts?: ClipPairOptions): Promise<ClipPairResult>;
402
- generateEpisode(brief: EpisodeBrief, opts?: ClipPairOptions): Promise<ClipPairResult>;
403
- }
404
-
405
- interface ClipPromptPair {
406
- clip1: string;
407
- clip2: string;
408
- voiceover: string;
409
- audioMood: string;
410
- }
411
- declare function buildClipPrompts(question: string, answer: string): Promise<ClipPromptPair>;
412
-
413
- export { type AICitation, type AIModeResult, type AIOverviewResult, type ClipPairOptions, type ClipPairResult, type FlatRow, type GoogleSurface, type HarvestCompletionStatus, type HarvestDiagnostics, type HarvestOptions, type HarvestResult, type HarvestStats, type PAANode, VideoGenerator, type WhatPeopleSayingCard, buildClipPrompts, harvest };