@minded-ai/mindedjs 1.0.0-ec2-beta-3 → 1.0.0-ec2-beta-4

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.
@@ -89,8 +89,14 @@ class ScreenshotCapture:
89
89
  # Get current page
90
90
  page = await agent.browser_session.get_current_page()
91
91
 
92
- # Get current URL for context
93
- current_url = page.url
92
+ # Get current URL for context - use page.url() method or fallback
93
+ try:
94
+ # Try as property first
95
+ current_url = page.url if hasattr(page, 'url') else page.url()
96
+ except:
97
+ # Fallback if URL is not accessible
98
+ current_url = "unknown"
99
+
94
100
  logger.info(f"📸 Taking step_end screenshot at: {current_url}")
95
101
 
96
102
  # Update step counter
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minded-ai/mindedjs",
3
- "version": "1.0.0-ec2-beta-3",
3
+ "version": "1.0.0-ec2-beta-4",
4
4
  "description": "MindedJS is a TypeScript library for building agents.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -89,8 +89,14 @@ class ScreenshotCapture:
89
89
  # Get current page
90
90
  page = await agent.browser_session.get_current_page()
91
91
 
92
- # Get current URL for context
93
- current_url = page.url
92
+ # Get current URL for context - use page.url() method or fallback
93
+ try:
94
+ # Try as property first
95
+ current_url = page.url if hasattr(page, 'url') else page.url()
96
+ except:
97
+ # Fallback if URL is not accessible
98
+ current_url = "unknown"
99
+
94
100
  logger.info(f"📸 Taking step_end screenshot at: {current_url}")
95
101
 
96
102
  # Update step counter