@minded-ai/mindedjs 2.0.28 → 2.0.29

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.
@@ -85,7 +85,11 @@ class ScreenshotCapture:
85
85
 
86
86
  # Take screenshot - browser-use takes viewport by default
87
87
  # Set timeout to prevent hanging (30 seconds)
88
- screenshot_data = await page.screenshot(timeout=30000)
88
+ try:
89
+ screenshot_data = await asyncio.wait_for(page.screenshot(), timeout=30)
90
+ except asyncio.TimeoutError:
91
+ logger.warning(f"⏱️ Screenshot #{step_number} timed out after 30 seconds, skipping...")
92
+ return
89
93
 
90
94
  # Ensure we have bytes - browser-use might return base64 string or bytes
91
95
  if isinstance(screenshot_data, bytes):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minded-ai/mindedjs",
3
- "version": "2.0.28",
3
+ "version": "2.0.29",
4
4
  "description": "MindedJS is a TypeScript library for building agents.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -85,7 +85,11 @@ class ScreenshotCapture:
85
85
 
86
86
  # Take screenshot - browser-use takes viewport by default
87
87
  # Set timeout to prevent hanging (30 seconds)
88
- screenshot_data = await page.screenshot(timeout=30000)
88
+ try:
89
+ screenshot_data = await asyncio.wait_for(page.screenshot(), timeout=30)
90
+ except asyncio.TimeoutError:
91
+ logger.warning(f"⏱️ Screenshot #{step_number} timed out after 30 seconds, skipping...")
92
+ return
89
93
 
90
94
  # Ensure we have bytes - browser-use might return base64 string or bytes
91
95
  if isinstance(screenshot_data, bytes):