mcp-scraper 0.1.0 → 0.1.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.
- package/README.md +5 -0
- package/dist/bin/api-server.cjs +15730 -7780
- package/dist/bin/api-server.cjs.map +1 -1
- package/dist/bin/api-server.js +3 -3
- package/dist/bin/mcp-stdio-server.cjs +300 -110
- package/dist/bin/mcp-stdio-server.cjs.map +1 -1
- package/dist/bin/mcp-stdio-server.js +1 -1
- package/dist/bin/paa-harvest.cjs +1537 -165
- package/dist/bin/paa-harvest.cjs.map +1 -1
- package/dist/bin/paa-harvest.js +1 -1
- package/dist/{chunk-ZBP4RHNW.js → chunk-4743MZHT.js} +298 -106
- package/dist/chunk-4743MZHT.js.map +1 -0
- package/dist/{chunk-LXZDJJXR.js → chunk-D4CJBZBY.js} +426 -29
- package/dist/chunk-D4CJBZBY.js.map +1 -0
- package/dist/chunk-HERFK7W6.js +2781 -0
- package/dist/chunk-HERFK7W6.js.map +1 -0
- package/dist/chunk-Y74EXABN.js +295 -0
- package/dist/chunk-Y74EXABN.js.map +1 -0
- package/dist/{db-IOYMX64U.js → db-YWCNHBLH.js} +36 -4
- package/dist/index.cjs +1660 -237
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +169 -2
- package/dist/index.d.ts +169 -2
- package/dist/index.js +120 -69
- package/dist/index.js.map +1 -1
- package/dist/server-N7Q6H4OR.js +11612 -0
- package/dist/server-N7Q6H4OR.js.map +1 -0
- package/dist/{worker-3ECJHPRE.js → worker-D4D2YQTA.js} +44 -9
- package/dist/worker-D4D2YQTA.js.map +1 -0
- package/package.json +17 -5
- package/dist/chunk-4API3ZCT.js +0 -1387
- package/dist/chunk-4API3ZCT.js.map +0 -1
- package/dist/chunk-LXZDJJXR.js.map +0 -1
- package/dist/chunk-ZBP4RHNW.js.map +0 -1
- package/dist/server-63DR2HE5.js +0 -6062
- package/dist/server-63DR2HE5.js.map +0 -1
- package/dist/worker-3ECJHPRE.js.map +0 -1
- /package/dist/{db-IOYMX64U.js.map → db-YWCNHBLH.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -5,6 +5,10 @@ declare const HarvestOptionsSchema: z.ZodObject<{
|
|
|
5
5
|
location: z.ZodOptional<z.ZodString>;
|
|
6
6
|
gl: z.ZodDefault<z.ZodString>;
|
|
7
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
|
+
debug: z.ZodDefault<z.ZodBoolean>;
|
|
8
12
|
depth: z.ZodDefault<z.ZodNumber>;
|
|
9
13
|
maxQuestions: z.ZodDefault<z.ZodNumber>;
|
|
10
14
|
headless: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -12,6 +16,7 @@ declare const HarvestOptionsSchema: z.ZodObject<{
|
|
|
12
16
|
proxy: z.ZodOptional<z.ZodString>;
|
|
13
17
|
kernelApiKey: z.ZodOptional<z.ZodString>;
|
|
14
18
|
kernelProxyId: z.ZodOptional<z.ZodString>;
|
|
19
|
+
kernelProxyResolution: z.ZodOptional<z.ZodUnknown>;
|
|
15
20
|
outputDir: z.ZodDefault<z.ZodString>;
|
|
16
21
|
format: z.ZodDefault<z.ZodEnum<["json", "csv", "both"]>>;
|
|
17
22
|
serpOnly: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -20,6 +25,9 @@ declare const HarvestOptionsSchema: z.ZodObject<{
|
|
|
20
25
|
query: string;
|
|
21
26
|
gl: string;
|
|
22
27
|
hl: string;
|
|
28
|
+
device: "desktop" | "mobile";
|
|
29
|
+
proxyMode: "location" | "configured" | "none";
|
|
30
|
+
debug: boolean;
|
|
23
31
|
depth: number;
|
|
24
32
|
maxQuestions: number;
|
|
25
33
|
headless: boolean;
|
|
@@ -28,15 +36,21 @@ declare const HarvestOptionsSchema: z.ZodObject<{
|
|
|
28
36
|
serpOnly: boolean;
|
|
29
37
|
pages: number;
|
|
30
38
|
location?: string | undefined;
|
|
39
|
+
proxyZip?: string | undefined;
|
|
31
40
|
profileDir?: string | undefined;
|
|
32
41
|
proxy?: string | undefined;
|
|
33
42
|
kernelApiKey?: string | undefined;
|
|
34
43
|
kernelProxyId?: string | undefined;
|
|
44
|
+
kernelProxyResolution?: unknown;
|
|
35
45
|
}, {
|
|
36
46
|
query: string;
|
|
37
47
|
location?: string | undefined;
|
|
38
48
|
gl?: string | undefined;
|
|
39
49
|
hl?: string | undefined;
|
|
50
|
+
device?: "desktop" | "mobile" | undefined;
|
|
51
|
+
proxyMode?: "location" | "configured" | "none" | undefined;
|
|
52
|
+
proxyZip?: string | undefined;
|
|
53
|
+
debug?: boolean | undefined;
|
|
40
54
|
depth?: number | undefined;
|
|
41
55
|
maxQuestions?: number | undefined;
|
|
42
56
|
headless?: boolean | undefined;
|
|
@@ -44,12 +58,41 @@ declare const HarvestOptionsSchema: z.ZodObject<{
|
|
|
44
58
|
proxy?: string | undefined;
|
|
45
59
|
kernelApiKey?: string | undefined;
|
|
46
60
|
kernelProxyId?: string | undefined;
|
|
61
|
+
kernelProxyResolution?: unknown;
|
|
47
62
|
outputDir?: string | undefined;
|
|
48
63
|
format?: "json" | "csv" | "both" | undefined;
|
|
49
64
|
serpOnly?: boolean | undefined;
|
|
50
65
|
pages?: number | undefined;
|
|
51
66
|
}>;
|
|
52
67
|
|
|
68
|
+
type CanonicalLocationName = string;
|
|
69
|
+
type SerpDevice = 'desktop' | 'mobile';
|
|
70
|
+
type ProxyMode = 'location' | 'configured' | 'none';
|
|
71
|
+
interface KernelLocationProxyTarget {
|
|
72
|
+
canonicalLocation: CanonicalLocationName;
|
|
73
|
+
level: 'zip' | 'city' | 'state';
|
|
74
|
+
country: 'US';
|
|
75
|
+
state: string;
|
|
76
|
+
city: string;
|
|
77
|
+
zip?: string;
|
|
78
|
+
cityCandidates: string[];
|
|
79
|
+
proxyName: string;
|
|
80
|
+
config: {
|
|
81
|
+
country: 'US';
|
|
82
|
+
state: string;
|
|
83
|
+
city?: string;
|
|
84
|
+
zip?: string;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
type KernelProxyResolutionSource = 'disabled' | 'location_reused' | 'location_created' | 'configured_fallback' | 'unavailable';
|
|
88
|
+
interface KernelProxyResolutionDebug {
|
|
89
|
+
source: KernelProxyResolutionSource;
|
|
90
|
+
proxyMode: ProxyMode;
|
|
91
|
+
proxyIdPresent: boolean;
|
|
92
|
+
proxyIdSuffix: string | null;
|
|
93
|
+
target: KernelLocationProxyTarget | null;
|
|
94
|
+
error: string | null;
|
|
95
|
+
}
|
|
53
96
|
interface HarvestStats {
|
|
54
97
|
seed: string;
|
|
55
98
|
totalQuestions: number;
|
|
@@ -57,6 +100,111 @@ interface HarvestStats {
|
|
|
57
100
|
durationMs: number;
|
|
58
101
|
errorCount: number;
|
|
59
102
|
}
|
|
103
|
+
type HarvestCompletionStatus = 'paa_found' | 'no_paa' | 'serp_only';
|
|
104
|
+
type HarvestDiagnosticWarningCode = 'short_videos_captcha_skipped';
|
|
105
|
+
type HarvestDiagnosticWarningSurface = 'short_videos';
|
|
106
|
+
interface HarvestDiagnosticWarning {
|
|
107
|
+
code: HarvestDiagnosticWarningCode;
|
|
108
|
+
surface: HarvestDiagnosticWarningSurface;
|
|
109
|
+
message: string;
|
|
110
|
+
retryable: boolean;
|
|
111
|
+
}
|
|
112
|
+
interface HarvestDiagnostics {
|
|
113
|
+
completionStatus: HarvestCompletionStatus;
|
|
114
|
+
problem: null;
|
|
115
|
+
warnings?: HarvestDiagnosticWarning[];
|
|
116
|
+
debug?: HarvestDebugSnapshot;
|
|
117
|
+
}
|
|
118
|
+
interface BrowserNetworkLocationDebug {
|
|
119
|
+
source: 'ipapi.co' | 'ipwho.is' | 'api64.ipify.org';
|
|
120
|
+
ip: string | null;
|
|
121
|
+
city: string | null;
|
|
122
|
+
region: string | null;
|
|
123
|
+
country: string | null;
|
|
124
|
+
org: string | null;
|
|
125
|
+
timezone: string | null;
|
|
126
|
+
error: string | null;
|
|
127
|
+
}
|
|
128
|
+
interface KernelSessionDebug {
|
|
129
|
+
sessionId: string | null;
|
|
130
|
+
proxyMode: ProxyMode;
|
|
131
|
+
requestedProxyIdPresent: boolean;
|
|
132
|
+
requestedProxyIdSuffix: string | null;
|
|
133
|
+
createdProxyIdPresent: boolean | null;
|
|
134
|
+
createdProxyIdSuffix: string | null;
|
|
135
|
+
retrievedProxyIdPresent: boolean | null;
|
|
136
|
+
retrievedProxyIdSuffix: string | null;
|
|
137
|
+
retrievedProxyIdMatchesRequested: boolean | null;
|
|
138
|
+
defaultProxyDisabled: boolean | null;
|
|
139
|
+
defaultProxyDisableError: string | null;
|
|
140
|
+
proxyResolution: KernelProxyResolutionDebug | null;
|
|
141
|
+
timeoutSeconds: number | null;
|
|
142
|
+
stealth: boolean | null;
|
|
143
|
+
profilePresent: boolean | null;
|
|
144
|
+
poolPresent: boolean | null;
|
|
145
|
+
retrieveError: string | null;
|
|
146
|
+
}
|
|
147
|
+
interface BrowserContextDebug {
|
|
148
|
+
viewport: {
|
|
149
|
+
width: number;
|
|
150
|
+
height: number;
|
|
151
|
+
};
|
|
152
|
+
locale: string;
|
|
153
|
+
device: SerpDevice;
|
|
154
|
+
userAgent: string;
|
|
155
|
+
deviceScaleFactor: number | null;
|
|
156
|
+
isMobile: boolean;
|
|
157
|
+
hasTouch: boolean;
|
|
158
|
+
}
|
|
159
|
+
interface SerpNavigationDebug {
|
|
160
|
+
requestedUrl: string;
|
|
161
|
+
finalUrl: string | null;
|
|
162
|
+
title: string | null;
|
|
163
|
+
bodySnippet: string | null;
|
|
164
|
+
hasPaa: boolean | null;
|
|
165
|
+
captchaDetected: boolean | null;
|
|
166
|
+
googleSorryUrl: boolean | null;
|
|
167
|
+
redirected: boolean | null;
|
|
168
|
+
}
|
|
169
|
+
interface BrowserDebugSnapshot {
|
|
170
|
+
kernel: KernelSessionDebug | null;
|
|
171
|
+
context: BrowserContextDebug | null;
|
|
172
|
+
networkLocation: BrowserNetworkLocationDebug | null;
|
|
173
|
+
serpNavigation: SerpNavigationDebug | null;
|
|
174
|
+
}
|
|
175
|
+
interface SerpLocationCandidate {
|
|
176
|
+
city: string;
|
|
177
|
+
regionCode: string;
|
|
178
|
+
count: number;
|
|
179
|
+
examples: string[];
|
|
180
|
+
}
|
|
181
|
+
interface SerpLocationEvidence {
|
|
182
|
+
status: 'not_requested' | 'matched' | 'mismatch' | 'unknown';
|
|
183
|
+
expected: {
|
|
184
|
+
city: string;
|
|
185
|
+
regionCode: string | null;
|
|
186
|
+
canonicalLocation: string;
|
|
187
|
+
} | null;
|
|
188
|
+
candidates: SerpLocationCandidate[];
|
|
189
|
+
}
|
|
190
|
+
interface HarvestDebugSnapshot {
|
|
191
|
+
enabled: true;
|
|
192
|
+
request: {
|
|
193
|
+
query: string;
|
|
194
|
+
locationInput: string | null;
|
|
195
|
+
canonicalLocation: string | null;
|
|
196
|
+
uule: string | null;
|
|
197
|
+
gl: string;
|
|
198
|
+
hl: string;
|
|
199
|
+
device: SerpDevice;
|
|
200
|
+
proxyMode: ProxyMode;
|
|
201
|
+
proxyZip: string | null;
|
|
202
|
+
serpOnly: boolean;
|
|
203
|
+
pages: number;
|
|
204
|
+
};
|
|
205
|
+
browser: BrowserDebugSnapshot;
|
|
206
|
+
locationEvidence?: SerpLocationEvidence;
|
|
207
|
+
}
|
|
60
208
|
interface PAANode {
|
|
61
209
|
question: string;
|
|
62
210
|
answer: string | null;
|
|
@@ -111,6 +259,9 @@ interface AIOverviewResult {
|
|
|
111
259
|
detected: boolean;
|
|
112
260
|
text: string | null;
|
|
113
261
|
citations: AICitation[];
|
|
262
|
+
expanded?: boolean;
|
|
263
|
+
fullyExpanded?: boolean;
|
|
264
|
+
sections?: string[];
|
|
114
265
|
}
|
|
115
266
|
interface AIModeResult {
|
|
116
267
|
detected: boolean;
|
|
@@ -157,6 +308,7 @@ interface HarvestResult {
|
|
|
157
308
|
seed: string;
|
|
158
309
|
location: string | null;
|
|
159
310
|
extractedAt: string;
|
|
311
|
+
diagnostics: HarvestDiagnostics;
|
|
160
312
|
totalQuestions: number;
|
|
161
313
|
surface: GoogleSurface;
|
|
162
314
|
aiOverview: AIOverviewResult;
|
|
@@ -175,6 +327,21 @@ type HarvestOptions = z.infer<typeof HarvestOptionsSchema>;
|
|
|
175
327
|
|
|
176
328
|
declare function harvest(rawOptions: unknown): Promise<HarvestResult>;
|
|
177
329
|
|
|
330
|
+
interface EpisodeBrief {
|
|
331
|
+
episodeNumber: number;
|
|
332
|
+
episodeCount: number;
|
|
333
|
+
slug: string;
|
|
334
|
+
sectionTitle: string;
|
|
335
|
+
storyMoment: string;
|
|
336
|
+
characterName: string;
|
|
337
|
+
clip1: string;
|
|
338
|
+
clip2: string;
|
|
339
|
+
voiceover: string;
|
|
340
|
+
audioMood: string;
|
|
341
|
+
depositionVisualTell: string;
|
|
342
|
+
continuityNote: string;
|
|
343
|
+
}
|
|
344
|
+
|
|
178
345
|
interface ClipPairOptions {
|
|
179
346
|
resolution?: '480p' | '720p' | '1080p';
|
|
180
347
|
aspectRatio?: '16:9' | '9:16' | '1:1';
|
|
@@ -182,7 +349,6 @@ interface ClipPairOptions {
|
|
|
182
349
|
generateAudio?: boolean;
|
|
183
350
|
seed?: number;
|
|
184
351
|
outputDir?: string;
|
|
185
|
-
ttsVoice?: string;
|
|
186
352
|
}
|
|
187
353
|
interface ClipPairResult {
|
|
188
354
|
clip1Url: string;
|
|
@@ -197,6 +363,7 @@ interface ClipPairResult {
|
|
|
197
363
|
declare class VideoGenerator {
|
|
198
364
|
constructor(apiKey?: string);
|
|
199
365
|
generateClipPair(question: string, answer: string, opts?: ClipPairOptions): Promise<ClipPairResult>;
|
|
366
|
+
generateEpisode(brief: EpisodeBrief, opts?: ClipPairOptions): Promise<ClipPairResult>;
|
|
200
367
|
}
|
|
201
368
|
|
|
202
369
|
interface ClipPromptPair {
|
|
@@ -207,4 +374,4 @@ interface ClipPromptPair {
|
|
|
207
374
|
}
|
|
208
375
|
declare function buildClipPrompts(question: string, answer: string): Promise<ClipPromptPair>;
|
|
209
376
|
|
|
210
|
-
export { type AICitation, type AIModeResult, type AIOverviewResult, type ClipPairOptions, type ClipPairResult, type FlatRow, type GoogleSurface, type HarvestOptions, type HarvestResult, type HarvestStats, type PAANode, VideoGenerator, type WhatPeopleSayingCard, buildClipPrompts, harvest };
|
|
377
|
+
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,10 @@ declare const HarvestOptionsSchema: z.ZodObject<{
|
|
|
5
5
|
location: z.ZodOptional<z.ZodString>;
|
|
6
6
|
gl: z.ZodDefault<z.ZodString>;
|
|
7
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
|
+
debug: z.ZodDefault<z.ZodBoolean>;
|
|
8
12
|
depth: z.ZodDefault<z.ZodNumber>;
|
|
9
13
|
maxQuestions: z.ZodDefault<z.ZodNumber>;
|
|
10
14
|
headless: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -12,6 +16,7 @@ declare const HarvestOptionsSchema: z.ZodObject<{
|
|
|
12
16
|
proxy: z.ZodOptional<z.ZodString>;
|
|
13
17
|
kernelApiKey: z.ZodOptional<z.ZodString>;
|
|
14
18
|
kernelProxyId: z.ZodOptional<z.ZodString>;
|
|
19
|
+
kernelProxyResolution: z.ZodOptional<z.ZodUnknown>;
|
|
15
20
|
outputDir: z.ZodDefault<z.ZodString>;
|
|
16
21
|
format: z.ZodDefault<z.ZodEnum<["json", "csv", "both"]>>;
|
|
17
22
|
serpOnly: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -20,6 +25,9 @@ declare const HarvestOptionsSchema: z.ZodObject<{
|
|
|
20
25
|
query: string;
|
|
21
26
|
gl: string;
|
|
22
27
|
hl: string;
|
|
28
|
+
device: "desktop" | "mobile";
|
|
29
|
+
proxyMode: "location" | "configured" | "none";
|
|
30
|
+
debug: boolean;
|
|
23
31
|
depth: number;
|
|
24
32
|
maxQuestions: number;
|
|
25
33
|
headless: boolean;
|
|
@@ -28,15 +36,21 @@ declare const HarvestOptionsSchema: z.ZodObject<{
|
|
|
28
36
|
serpOnly: boolean;
|
|
29
37
|
pages: number;
|
|
30
38
|
location?: string | undefined;
|
|
39
|
+
proxyZip?: string | undefined;
|
|
31
40
|
profileDir?: string | undefined;
|
|
32
41
|
proxy?: string | undefined;
|
|
33
42
|
kernelApiKey?: string | undefined;
|
|
34
43
|
kernelProxyId?: string | undefined;
|
|
44
|
+
kernelProxyResolution?: unknown;
|
|
35
45
|
}, {
|
|
36
46
|
query: string;
|
|
37
47
|
location?: string | undefined;
|
|
38
48
|
gl?: string | undefined;
|
|
39
49
|
hl?: string | undefined;
|
|
50
|
+
device?: "desktop" | "mobile" | undefined;
|
|
51
|
+
proxyMode?: "location" | "configured" | "none" | undefined;
|
|
52
|
+
proxyZip?: string | undefined;
|
|
53
|
+
debug?: boolean | undefined;
|
|
40
54
|
depth?: number | undefined;
|
|
41
55
|
maxQuestions?: number | undefined;
|
|
42
56
|
headless?: boolean | undefined;
|
|
@@ -44,12 +58,41 @@ declare const HarvestOptionsSchema: z.ZodObject<{
|
|
|
44
58
|
proxy?: string | undefined;
|
|
45
59
|
kernelApiKey?: string | undefined;
|
|
46
60
|
kernelProxyId?: string | undefined;
|
|
61
|
+
kernelProxyResolution?: unknown;
|
|
47
62
|
outputDir?: string | undefined;
|
|
48
63
|
format?: "json" | "csv" | "both" | undefined;
|
|
49
64
|
serpOnly?: boolean | undefined;
|
|
50
65
|
pages?: number | undefined;
|
|
51
66
|
}>;
|
|
52
67
|
|
|
68
|
+
type CanonicalLocationName = string;
|
|
69
|
+
type SerpDevice = 'desktop' | 'mobile';
|
|
70
|
+
type ProxyMode = 'location' | 'configured' | 'none';
|
|
71
|
+
interface KernelLocationProxyTarget {
|
|
72
|
+
canonicalLocation: CanonicalLocationName;
|
|
73
|
+
level: 'zip' | 'city' | 'state';
|
|
74
|
+
country: 'US';
|
|
75
|
+
state: string;
|
|
76
|
+
city: string;
|
|
77
|
+
zip?: string;
|
|
78
|
+
cityCandidates: string[];
|
|
79
|
+
proxyName: string;
|
|
80
|
+
config: {
|
|
81
|
+
country: 'US';
|
|
82
|
+
state: string;
|
|
83
|
+
city?: string;
|
|
84
|
+
zip?: string;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
type KernelProxyResolutionSource = 'disabled' | 'location_reused' | 'location_created' | 'configured_fallback' | 'unavailable';
|
|
88
|
+
interface KernelProxyResolutionDebug {
|
|
89
|
+
source: KernelProxyResolutionSource;
|
|
90
|
+
proxyMode: ProxyMode;
|
|
91
|
+
proxyIdPresent: boolean;
|
|
92
|
+
proxyIdSuffix: string | null;
|
|
93
|
+
target: KernelLocationProxyTarget | null;
|
|
94
|
+
error: string | null;
|
|
95
|
+
}
|
|
53
96
|
interface HarvestStats {
|
|
54
97
|
seed: string;
|
|
55
98
|
totalQuestions: number;
|
|
@@ -57,6 +100,111 @@ interface HarvestStats {
|
|
|
57
100
|
durationMs: number;
|
|
58
101
|
errorCount: number;
|
|
59
102
|
}
|
|
103
|
+
type HarvestCompletionStatus = 'paa_found' | 'no_paa' | 'serp_only';
|
|
104
|
+
type HarvestDiagnosticWarningCode = 'short_videos_captcha_skipped';
|
|
105
|
+
type HarvestDiagnosticWarningSurface = 'short_videos';
|
|
106
|
+
interface HarvestDiagnosticWarning {
|
|
107
|
+
code: HarvestDiagnosticWarningCode;
|
|
108
|
+
surface: HarvestDiagnosticWarningSurface;
|
|
109
|
+
message: string;
|
|
110
|
+
retryable: boolean;
|
|
111
|
+
}
|
|
112
|
+
interface HarvestDiagnostics {
|
|
113
|
+
completionStatus: HarvestCompletionStatus;
|
|
114
|
+
problem: null;
|
|
115
|
+
warnings?: HarvestDiagnosticWarning[];
|
|
116
|
+
debug?: HarvestDebugSnapshot;
|
|
117
|
+
}
|
|
118
|
+
interface BrowserNetworkLocationDebug {
|
|
119
|
+
source: 'ipapi.co' | 'ipwho.is' | 'api64.ipify.org';
|
|
120
|
+
ip: string | null;
|
|
121
|
+
city: string | null;
|
|
122
|
+
region: string | null;
|
|
123
|
+
country: string | null;
|
|
124
|
+
org: string | null;
|
|
125
|
+
timezone: string | null;
|
|
126
|
+
error: string | null;
|
|
127
|
+
}
|
|
128
|
+
interface KernelSessionDebug {
|
|
129
|
+
sessionId: string | null;
|
|
130
|
+
proxyMode: ProxyMode;
|
|
131
|
+
requestedProxyIdPresent: boolean;
|
|
132
|
+
requestedProxyIdSuffix: string | null;
|
|
133
|
+
createdProxyIdPresent: boolean | null;
|
|
134
|
+
createdProxyIdSuffix: string | null;
|
|
135
|
+
retrievedProxyIdPresent: boolean | null;
|
|
136
|
+
retrievedProxyIdSuffix: string | null;
|
|
137
|
+
retrievedProxyIdMatchesRequested: boolean | null;
|
|
138
|
+
defaultProxyDisabled: boolean | null;
|
|
139
|
+
defaultProxyDisableError: string | null;
|
|
140
|
+
proxyResolution: KernelProxyResolutionDebug | null;
|
|
141
|
+
timeoutSeconds: number | null;
|
|
142
|
+
stealth: boolean | null;
|
|
143
|
+
profilePresent: boolean | null;
|
|
144
|
+
poolPresent: boolean | null;
|
|
145
|
+
retrieveError: string | null;
|
|
146
|
+
}
|
|
147
|
+
interface BrowserContextDebug {
|
|
148
|
+
viewport: {
|
|
149
|
+
width: number;
|
|
150
|
+
height: number;
|
|
151
|
+
};
|
|
152
|
+
locale: string;
|
|
153
|
+
device: SerpDevice;
|
|
154
|
+
userAgent: string;
|
|
155
|
+
deviceScaleFactor: number | null;
|
|
156
|
+
isMobile: boolean;
|
|
157
|
+
hasTouch: boolean;
|
|
158
|
+
}
|
|
159
|
+
interface SerpNavigationDebug {
|
|
160
|
+
requestedUrl: string;
|
|
161
|
+
finalUrl: string | null;
|
|
162
|
+
title: string | null;
|
|
163
|
+
bodySnippet: string | null;
|
|
164
|
+
hasPaa: boolean | null;
|
|
165
|
+
captchaDetected: boolean | null;
|
|
166
|
+
googleSorryUrl: boolean | null;
|
|
167
|
+
redirected: boolean | null;
|
|
168
|
+
}
|
|
169
|
+
interface BrowserDebugSnapshot {
|
|
170
|
+
kernel: KernelSessionDebug | null;
|
|
171
|
+
context: BrowserContextDebug | null;
|
|
172
|
+
networkLocation: BrowserNetworkLocationDebug | null;
|
|
173
|
+
serpNavigation: SerpNavigationDebug | null;
|
|
174
|
+
}
|
|
175
|
+
interface SerpLocationCandidate {
|
|
176
|
+
city: string;
|
|
177
|
+
regionCode: string;
|
|
178
|
+
count: number;
|
|
179
|
+
examples: string[];
|
|
180
|
+
}
|
|
181
|
+
interface SerpLocationEvidence {
|
|
182
|
+
status: 'not_requested' | 'matched' | 'mismatch' | 'unknown';
|
|
183
|
+
expected: {
|
|
184
|
+
city: string;
|
|
185
|
+
regionCode: string | null;
|
|
186
|
+
canonicalLocation: string;
|
|
187
|
+
} | null;
|
|
188
|
+
candidates: SerpLocationCandidate[];
|
|
189
|
+
}
|
|
190
|
+
interface HarvestDebugSnapshot {
|
|
191
|
+
enabled: true;
|
|
192
|
+
request: {
|
|
193
|
+
query: string;
|
|
194
|
+
locationInput: string | null;
|
|
195
|
+
canonicalLocation: string | null;
|
|
196
|
+
uule: string | null;
|
|
197
|
+
gl: string;
|
|
198
|
+
hl: string;
|
|
199
|
+
device: SerpDevice;
|
|
200
|
+
proxyMode: ProxyMode;
|
|
201
|
+
proxyZip: string | null;
|
|
202
|
+
serpOnly: boolean;
|
|
203
|
+
pages: number;
|
|
204
|
+
};
|
|
205
|
+
browser: BrowserDebugSnapshot;
|
|
206
|
+
locationEvidence?: SerpLocationEvidence;
|
|
207
|
+
}
|
|
60
208
|
interface PAANode {
|
|
61
209
|
question: string;
|
|
62
210
|
answer: string | null;
|
|
@@ -111,6 +259,9 @@ interface AIOverviewResult {
|
|
|
111
259
|
detected: boolean;
|
|
112
260
|
text: string | null;
|
|
113
261
|
citations: AICitation[];
|
|
262
|
+
expanded?: boolean;
|
|
263
|
+
fullyExpanded?: boolean;
|
|
264
|
+
sections?: string[];
|
|
114
265
|
}
|
|
115
266
|
interface AIModeResult {
|
|
116
267
|
detected: boolean;
|
|
@@ -157,6 +308,7 @@ interface HarvestResult {
|
|
|
157
308
|
seed: string;
|
|
158
309
|
location: string | null;
|
|
159
310
|
extractedAt: string;
|
|
311
|
+
diagnostics: HarvestDiagnostics;
|
|
160
312
|
totalQuestions: number;
|
|
161
313
|
surface: GoogleSurface;
|
|
162
314
|
aiOverview: AIOverviewResult;
|
|
@@ -175,6 +327,21 @@ type HarvestOptions = z.infer<typeof HarvestOptionsSchema>;
|
|
|
175
327
|
|
|
176
328
|
declare function harvest(rawOptions: unknown): Promise<HarvestResult>;
|
|
177
329
|
|
|
330
|
+
interface EpisodeBrief {
|
|
331
|
+
episodeNumber: number;
|
|
332
|
+
episodeCount: number;
|
|
333
|
+
slug: string;
|
|
334
|
+
sectionTitle: string;
|
|
335
|
+
storyMoment: string;
|
|
336
|
+
characterName: string;
|
|
337
|
+
clip1: string;
|
|
338
|
+
clip2: string;
|
|
339
|
+
voiceover: string;
|
|
340
|
+
audioMood: string;
|
|
341
|
+
depositionVisualTell: string;
|
|
342
|
+
continuityNote: string;
|
|
343
|
+
}
|
|
344
|
+
|
|
178
345
|
interface ClipPairOptions {
|
|
179
346
|
resolution?: '480p' | '720p' | '1080p';
|
|
180
347
|
aspectRatio?: '16:9' | '9:16' | '1:1';
|
|
@@ -182,7 +349,6 @@ interface ClipPairOptions {
|
|
|
182
349
|
generateAudio?: boolean;
|
|
183
350
|
seed?: number;
|
|
184
351
|
outputDir?: string;
|
|
185
|
-
ttsVoice?: string;
|
|
186
352
|
}
|
|
187
353
|
interface ClipPairResult {
|
|
188
354
|
clip1Url: string;
|
|
@@ -197,6 +363,7 @@ interface ClipPairResult {
|
|
|
197
363
|
declare class VideoGenerator {
|
|
198
364
|
constructor(apiKey?: string);
|
|
199
365
|
generateClipPair(question: string, answer: string, opts?: ClipPairOptions): Promise<ClipPairResult>;
|
|
366
|
+
generateEpisode(brief: EpisodeBrief, opts?: ClipPairOptions): Promise<ClipPairResult>;
|
|
200
367
|
}
|
|
201
368
|
|
|
202
369
|
interface ClipPromptPair {
|
|
@@ -207,4 +374,4 @@ interface ClipPromptPair {
|
|
|
207
374
|
}
|
|
208
375
|
declare function buildClipPrompts(question: string, answer: string): Promise<ClipPromptPair>;
|
|
209
376
|
|
|
210
|
-
export { type AICitation, type AIModeResult, type AIOverviewResult, type ClipPairOptions, type ClipPairResult, type FlatRow, type GoogleSurface, type HarvestOptions, type HarvestResult, type HarvestStats, type PAANode, VideoGenerator, type WhatPeopleSayingCard, buildClipPrompts, harvest };
|
|
377
|
+
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 };
|