@crawlee/stagehand 4.0.0-beta.102 → 4.0.0-beta.104
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.
|
@@ -172,7 +172,7 @@ export interface StagehandPage extends Page {
|
|
|
172
172
|
* Goto options for StagehandCrawler navigation.
|
|
173
173
|
*/
|
|
174
174
|
export type StagehandGotoOptions = NonNullable<Parameters<Page['goto']>[1]>;
|
|
175
|
-
export interface StagehandCrawlingContext<UserData extends Dictionary =
|
|
175
|
+
export interface StagehandCrawlingContext<UserData extends Dictionary = any> extends BrowserCrawlingContext<StagehandPage, Response, UserData, StagehandGotoOptions> {
|
|
176
176
|
/**
|
|
177
177
|
* Enhanced Playwright page with Stagehand AI methods.
|
|
178
178
|
* Use page.act(), page.extract(), page.observe(), page.agent() for AI-powered operations.
|
|
@@ -187,8 +187,7 @@ export interface StagehandCrawlingContext<UserData extends Dictionary = Dictiona
|
|
|
187
187
|
/**
|
|
188
188
|
* Hook function for StagehandCrawler.
|
|
189
189
|
*/
|
|
190
|
-
export
|
|
191
|
-
}
|
|
190
|
+
export type StagehandHook<UserData extends Dictionary = any> = BrowserHook<StagehandCrawlingContext<UserData>>;
|
|
192
191
|
/**
|
|
193
192
|
* Request handler for StagehandCrawler.
|
|
194
193
|
*/
|
|
@@ -257,11 +256,11 @@ export interface StagehandCrawlerOptions<ContextExtension = Dictionary<never>, E
|
|
|
257
256
|
/**
|
|
258
257
|
* Async functions that are sequentially evaluated before the navigation.
|
|
259
258
|
*/
|
|
260
|
-
preNavigationHooks?:
|
|
259
|
+
preNavigationHooks?: BrowserHook<StagehandCrawlingContext<GetUserDataFromRequest<ExtendedContext['request']>>, ContextExtension>[];
|
|
261
260
|
/**
|
|
262
261
|
* Async functions that are sequentially evaluated after the navigation.
|
|
263
262
|
*/
|
|
264
|
-
postNavigationHooks?:
|
|
263
|
+
postNavigationHooks?: BrowserHook<StagehandCrawlingContext<GetUserDataFromRequest<ExtendedContext['request']>>, ContextExtension>[];
|
|
265
264
|
}
|
|
266
265
|
/**
|
|
267
266
|
* StagehandCrawler provides AI-powered web crawling using Browserbase's Stagehand library.
|
|
@@ -403,7 +402,7 @@ export declare class StagehandCrawler<ContextExtension = Dictionary<never>, Exte
|
|
|
403
402
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
404
403
|
keepAlive: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
405
404
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
406
|
-
|
|
405
|
+
statistics: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
407
406
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
408
407
|
id: import("ow").StringPredicate & import("ow").BasePredicate<string | undefined>;
|
|
409
408
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crawlee/stagehand",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.104",
|
|
4
4
|
"description": "AI-powered web crawling with Stagehand integration for Crawlee - enables natural language browser automation with act(), extract(), and observe() methods.",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22.0.0"
|
|
@@ -57,11 +57,11 @@
|
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@apify/timeout": "^0.4.4",
|
|
60
|
-
"@crawlee/browser": "4.0.0-beta.
|
|
61
|
-
"@crawlee/browser-pool": "4.0.0-beta.
|
|
62
|
-
"@crawlee/core": "4.0.0-beta.
|
|
63
|
-
"@crawlee/types": "4.0.0-beta.
|
|
64
|
-
"@crawlee/utils": "4.0.0-beta.
|
|
60
|
+
"@crawlee/browser": "4.0.0-beta.104",
|
|
61
|
+
"@crawlee/browser-pool": "4.0.0-beta.104",
|
|
62
|
+
"@crawlee/core": "4.0.0-beta.104",
|
|
63
|
+
"@crawlee/types": "4.0.0-beta.104",
|
|
64
|
+
"@crawlee/utils": "4.0.0-beta.104",
|
|
65
65
|
"ow": "^2.0.0",
|
|
66
66
|
"tslib": "^2.8.1"
|
|
67
67
|
},
|
|
@@ -93,5 +93,5 @@
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
},
|
|
96
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "1c761e689e56ac06b67fc4f1dc091f693e024d12"
|
|
97
97
|
}
|