@crawlee/stagehand 4.0.0-beta.124 → 4.0.0-beta.125

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/index.mjs CHANGED
@@ -92,6 +92,7 @@ export const coerceNumber = mod.coerceNumber;
92
92
  export const constructGlobObjectsFromGlobs = mod.constructGlobObjectsFromGlobs;
93
93
  export const constructRegExpObjectsFromRegExps = mod.constructRegExpObjectsFromRegExps;
94
94
  export const constructUrlPatternObjects = mod.constructUrlPatternObjects;
95
+ export const convertStateSync = mod.convertStateSync;
95
96
  export const cookieStringToToughCookie = mod.cookieStringToToughCookie;
96
97
  export const crawleeConfigFields = mod.crawleeConfigFields;
97
98
  export const createBasicRouter = mod.createBasicRouter;
@@ -196,9 +196,9 @@ export interface StagehandRequestHandler extends RequestHandler<LoadedContext<St
196
196
  /**
197
197
  * Options for StagehandCrawler.
198
198
  */
199
- export interface StagehandCrawlerOptions<ContextExtension = Dictionary<never>, ExtendedContext extends StagehandCrawlingContext = StagehandCrawlingContext & ContextExtension, Routes extends Record<keyof Routes, Dictionary> = Record<string, GetUserDataFromRequest<StagehandCrawlingContext['request']>>> extends BrowserCrawlerOptions<StagehandPage, Response, StagehandCrawlingContext, ContextExtension, ExtendedContext, {
199
+ export interface StagehandCrawlerOptions<ContextExtension = Dictionary<never>, ExtendedContext extends StagehandCrawlingContext = StagehandCrawlingContext & ContextExtension, Routes extends Record<keyof Routes, Dictionary> = Record<string, GetUserDataFromRequest<StagehandCrawlingContext['request']>>, StatisticStateExtension extends object = {}> extends BrowserCrawlerOptions<StagehandPage, Response, StagehandCrawlingContext, ContextExtension, ExtendedContext, {
200
200
  browserPlugins: [StagehandPlugin];
201
- }, Routes> {
201
+ }, Routes, StatisticStateExtension> {
202
202
  /**
203
203
  * Stagehand-specific configuration options.
204
204
  * These options configure the AI behavior and Browserbase integration.
@@ -311,9 +311,9 @@ export interface StagehandCrawlerOptions<ContextExtension = Dictionary<never>, E
311
311
  * await crawler.run(['https://example.com']);
312
312
  * ```
313
313
  */
314
- export declare class StagehandCrawler<ContextExtension = Dictionary<never>, ExtendedContext extends StagehandCrawlingContext = StagehandCrawlingContext & ContextExtension, Routes extends Record<keyof Routes, Dictionary> = Record<string, GetUserDataFromRequest<StagehandCrawlingContext['request']>>> extends BrowserCrawler<StagehandPage, Response, {
314
+ export declare class StagehandCrawler<ContextExtension = Dictionary<never>, ExtendedContext extends StagehandCrawlingContext = StagehandCrawlingContext & ContextExtension, Routes extends Record<keyof Routes, Dictionary> = Record<string, GetUserDataFromRequest<StagehandCrawlingContext['request']>>, StatisticStateExtension extends object = {}> extends BrowserCrawler<StagehandPage, Response, {
315
315
  browserPlugins: [StagehandPlugin];
316
- }, LaunchOptions, StagehandCrawlingContext, ContextExtension, ExtendedContext, Routes> {
316
+ }, LaunchOptions, StagehandCrawlingContext, ContextExtension, ExtendedContext, Routes, StatisticStateExtension> {
317
317
  protected static optionsShape: {
318
318
  stagehandOptions: z.ZodOptional<z.ZodCustom<Dictionary, Dictionary>>;
319
319
  browserPoolOptions: z.ZodOptional<z.ZodCustom<Dictionary, Dictionary>>;
@@ -437,7 +437,7 @@ export declare class StagehandCrawler<ContextExtension = Dictionary<never>, Exte
437
437
  *
438
438
  * @param options - Crawler configuration options
439
439
  */
440
- constructor(options?: StagehandCrawlerOptions<ContextExtension, ExtendedContext, Routes>);
440
+ constructor(options?: StagehandCrawlerOptions<ContextExtension, ExtendedContext, Routes, StatisticStateExtension>);
441
441
  protected buildContextPipeline(): ContextPipeline<CrawlingContext, StagehandCrawlingContext>;
442
442
  /**
443
443
  * Resolves the {@link StagehandController} that owns the given page, or
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crawlee/stagehand",
3
- "version": "4.0.0-beta.124",
3
+ "version": "4.0.0-beta.125",
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.124",
61
- "@crawlee/browser-pool": "4.0.0-beta.124",
62
- "@crawlee/core": "4.0.0-beta.124",
63
- "@crawlee/types": "4.0.0-beta.124",
64
- "@crawlee/utils": "4.0.0-beta.124",
60
+ "@crawlee/browser": "4.0.0-beta.125",
61
+ "@crawlee/browser-pool": "4.0.0-beta.125",
62
+ "@crawlee/core": "4.0.0-beta.125",
63
+ "@crawlee/types": "4.0.0-beta.125",
64
+ "@crawlee/utils": "4.0.0-beta.125",
65
65
  "tslib": "^2.8.1",
66
66
  "zod": "^4.4.3"
67
67
  },
@@ -88,5 +88,5 @@
88
88
  }
89
89
  }
90
90
  },
91
- "gitHead": "0694ee1b94c755b98141671baa93cc363f2bf8e3"
91
+ "gitHead": "04a7212dd4abe4a5f94f5fc9632acb6089819c8b"
92
92
  }