cursorflow 2.2.5__tar.gz → 2.2.7__tar.gz

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.
Files changed (50) hide show
  1. {cursorflow-2.2.5 → cursorflow-2.2.7}/PKG-INFO +3 -3
  2. {cursorflow-2.2.5 → cursorflow-2.2.7}/README.md +2 -2
  3. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/__init__.py +1 -1
  4. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/cli.py +6 -6
  5. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/core/browser_controller.py +9 -4
  6. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/core/cursorflow.py +15 -1
  7. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/core/log_collector.py +5 -1
  8. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/log_sources/local_file.py +4 -0
  9. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/log_sources/ssh_remote.py +4 -0
  10. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/rules/cursorflow-usage.mdc +54 -59
  11. {cursorflow-2.2.5 → cursorflow-2.2.7}/pyproject.toml +1 -1
  12. {cursorflow-2.2.5 → cursorflow-2.2.7}/FIRST_TIME_SETUP.md +0 -0
  13. {cursorflow-2.2.5 → cursorflow-2.2.7}/LICENSE +0 -0
  14. {cursorflow-2.2.5 → cursorflow-2.2.7}/MANIFEST.in +0 -0
  15. {cursorflow-2.2.5 → cursorflow-2.2.7}/POST_INSTALL_MESSAGE.txt +0 -0
  16. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/auto_init.py +0 -0
  17. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/auto_updater.py +0 -0
  18. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/core/action_validator.py +0 -0
  19. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/core/agent.py +0 -0
  20. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/core/auth_handler.py +0 -0
  21. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/core/browser_engine.py +0 -0
  22. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/core/config_validator.py +0 -0
  23. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/core/css_iterator.py +0 -0
  24. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/core/cursor_integration.py +0 -0
  25. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/core/error_context_collector.py +0 -0
  26. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/core/error_correlator.py +0 -0
  27. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/core/event_correlator.py +0 -0
  28. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/core/file_change_monitor.py +0 -0
  29. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/core/hmr_detector.py +0 -0
  30. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/core/log_monitor.py +0 -0
  31. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/core/mockup_comparator.py +0 -0
  32. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/core/persistent_session.py +0 -0
  33. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/core/report_generator.py +0 -0
  34. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/core/trace_manager.py +0 -0
  35. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/install_cursorflow_rules.py +0 -0
  36. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/post_install.py +0 -0
  37. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/rules/__init__.py +0 -0
  38. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/rules/cursorflow-installation.mdc +0 -0
  39. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow/updater.py +0 -0
  40. {cursorflow-2.2.5 → cursorflow-2.2.7}/cursorflow.egg-info/SOURCES.txt +0 -0
  41. {cursorflow-2.2.5 → cursorflow-2.2.7}/docs/USER_MANUAL.md +0 -0
  42. {cursorflow-2.2.5 → cursorflow-2.2.7}/examples/comprehensive_screenshot_example.py +0 -0
  43. {cursorflow-2.2.5 → cursorflow-2.2.7}/examples/enhanced_screenshot_example.py +0 -0
  44. {cursorflow-2.2.5 → cursorflow-2.2.7}/examples/mockup_comparison_example.py +0 -0
  45. {cursorflow-2.2.5 → cursorflow-2.2.7}/examples/opensas_example.py +0 -0
  46. {cursorflow-2.2.5 → cursorflow-2.2.7}/examples/react_example.py +0 -0
  47. {cursorflow-2.2.5 → cursorflow-2.2.7}/examples/responsive_testing_example.py +0 -0
  48. {cursorflow-2.2.5 → cursorflow-2.2.7}/examples/v2_comprehensive_demo.py +0 -0
  49. {cursorflow-2.2.5 → cursorflow-2.2.7}/setup.cfg +0 -0
  50. {cursorflow-2.2.5 → cursorflow-2.2.7}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cursorflow
3
- Version: 2.2.5
3
+ Version: 2.2.7
4
4
  Summary: 🔥 Complete page intelligence for AI-driven development with Hot Reload Intelligence - captures DOM, network, console, performance, HMR events, and comprehensive page analysis
5
5
  Author-email: GeekWarrior Development <rbush@cooltheory.com>
6
6
  License-Expression: MIT
@@ -140,7 +140,7 @@ cursorflow cleanup --all
140
140
  cursorflow cleanup --all --dry-run
141
141
  ```
142
142
 
143
- **See:** [Artifact Cleanup Guide](docs/user/ARTIFACT_CLEANUP_GUIDE.md)
143
+ **See:** [Complete Usage Guide](docs/user/USAGE_GUIDE.md#artifact-management)
144
144
 
145
145
  ---
146
146
 
@@ -157,7 +157,7 @@ Every test captures everything needed for debugging:
157
157
  - **Forms**: All field values at capture time (passwords masked)
158
158
  - **Performance**: Load times, memory usage, reliability indicators
159
159
  - **Visual**: Screenshots with comprehensive page analysis
160
- - **Sessions**: Save/restore browser state for authenticated testing
160
+ - **Sessions**: Save/restore authenticated browser state (requires auth_config)
161
161
 
162
162
  ### **🔄 Hot Reload Intelligence**
163
163
  - **Framework auto-detection** (Vite, Webpack, Next.js, Parcel, Laravel Mix)
@@ -95,7 +95,7 @@ cursorflow cleanup --all
95
95
  cursorflow cleanup --all --dry-run
96
96
  ```
97
97
 
98
- **See:** [Artifact Cleanup Guide](docs/user/ARTIFACT_CLEANUP_GUIDE.md)
98
+ **See:** [Complete Usage Guide](docs/user/USAGE_GUIDE.md#artifact-management)
99
99
 
100
100
  ---
101
101
 
@@ -112,7 +112,7 @@ Every test captures everything needed for debugging:
112
112
  - **Forms**: All field values at capture time (passwords masked)
113
113
  - **Performance**: Load times, memory usage, reliability indicators
114
114
  - **Visual**: Screenshots with comprehensive page analysis
115
- - **Sessions**: Save/restore browser state for authenticated testing
115
+ - **Sessions**: Save/restore authenticated browser state (requires auth_config)
116
116
 
117
117
  ### **🔄 Hot Reload Intelligence**
118
118
  - **Framework auto-detection** (Vite, Webpack, Next.js, Parcel, Laravel Mix)
@@ -56,7 +56,7 @@ def _get_version():
56
56
  pass
57
57
 
58
58
  # Fallback version - should match pyproject.toml
59
- return "2.2.5"
59
+ return "2.2.7"
60
60
 
61
61
  __version__ = _get_version()
62
62
  __author__ = "GeekWarrior Development"
@@ -81,9 +81,9 @@ def main(ctx):
81
81
  @click.option('--responsive', is_flag=True,
82
82
  help='Test across multiple viewports (mobile, tablet, desktop)')
83
83
  @click.option('--save-session', '-S',
84
- help='Save browser session state with this name for later reuse')
84
+ help='Save authenticated session state (requires auth_config in .cursorflow/config.json)')
85
85
  @click.option('--use-session', '-U',
86
- help='Restore and use a previously saved session')
86
+ help='Restore authenticated session state (requires auth_config in .cursorflow/config.json)')
87
87
  @click.option('--wait-for', '-w',
88
88
  help='Wait for selector to appear before continuing')
89
89
  @click.option('--wait-timeout', type=int, default=30,
@@ -194,7 +194,7 @@ def test(base_url, path, actions, output, logs, config, verbose, headless, timeo
194
194
  # Simple path navigation
195
195
  test_actions = [
196
196
  {"navigate": path},
197
- {"wait_for": "body"},
197
+ {"wait_for_selector": "body"},
198
198
  {"screenshot": "page_loaded"}
199
199
  ]
200
200
  console.print(f"📋 Using simple path navigation to [cyan]{path}[/cyan]")
@@ -202,7 +202,7 @@ def test(base_url, path, actions, output, logs, config, verbose, headless, timeo
202
202
  # Default actions - just navigate to root and screenshot
203
203
  test_actions = [
204
204
  {"navigate": "/"},
205
- {"wait_for": "body"},
205
+ {"wait_for_selector": "body"},
206
206
  {"screenshot": "baseline"}
207
207
  ]
208
208
  console.print(f"📋 Using default actions (navigate to root + screenshot)")
@@ -1087,12 +1087,12 @@ def _display_test_results(results: Dict, test_description: str, show_console: bo
1087
1087
  console.print(f"\n📊 Captured:")
1088
1088
  console.print(f" • Elements: {len(comprehensive_data.get('dom_analysis', {}).get('elements', []))}")
1089
1089
  console.print(f" • Network requests: {len(comprehensive_data.get('network_data', {}).get('all_network_events', []))}")
1090
- console.print(f" • Console messages: {len(comprehensive_data.get('console_data', {}).get('console_logs', []))}")
1090
+ console.print(f" • Console messages: {len(comprehensive_data.get('console_data', {}).get('all_console_logs', []))}")
1091
1091
  console.print(f" • Screenshots: {len(artifacts.get('screenshots', []))}")
1092
1092
 
1093
1093
  # Phase 4.1: Console messages display
1094
1094
  console_data = comprehensive_data.get('console_data', {})
1095
- console_logs = console_data.get('console_logs', [])
1095
+ console_logs = console_data.get('all_console_logs', [])
1096
1096
 
1097
1097
  if console_logs and (show_console or show_all_console):
1098
1098
  errors = [log for log in console_logs if log.get('type') == 'error']
@@ -1148,13 +1148,15 @@ class BrowserController:
1148
1148
  # v2.0 Enhancement: Resource loading analysis
1149
1149
  resource_analysis = await self._capture_resource_loading_analysis()
1150
1150
 
1151
- # v2.0 Enhancement: Storage state (read-only)
1152
- storage_analysis = await self._capture_storage_state()
1151
+ # v2.2 Enhancement: Enhanced context capture
1152
+ javascript_context = await self._capture_javascript_context()
1153
+ storage_state = await self._capture_storage_state() # This also serves as storage_analysis
1154
+ form_state = await self._capture_form_state()
1153
1155
 
1154
1156
  # Create enhanced analysis summary
1155
1157
  analysis_summary = self._create_analysis_summary(
1156
1158
  dom_analysis, network_data, console_data, performance_data,
1157
- font_analysis, animation_analysis, resource_analysis, storage_analysis
1159
+ font_analysis, animation_analysis, resource_analysis, storage_state
1158
1160
  )
1159
1161
 
1160
1162
  return {
@@ -1171,7 +1173,7 @@ class BrowserController:
1171
1173
  "font_analysis": font_analysis,
1172
1174
  "animation_analysis": animation_analysis,
1173
1175
  "resource_analysis": resource_analysis,
1174
- "storage_analysis": storage_analysis,
1176
+ "storage_analysis": storage_state, # v2.2 uses storage_state
1175
1177
 
1176
1178
  "analysis_summary": analysis_summary,
1177
1179
  "capture_timestamp": time.time(),
@@ -2248,6 +2250,9 @@ class BrowserController:
2248
2250
  def _capture_console_data(self) -> Dict[str, Any]:
2249
2251
  """Capture comprehensive console log data"""
2250
2252
  try:
2253
+ # Debug: Log console capture state
2254
+ self.logger.debug(f"Capturing console data: {len(self.console_logs)} messages in buffer")
2255
+
2251
2256
  # Categorize console logs
2252
2257
  errors = [log for log in self.console_logs if log.get("type") == "error"]
2253
2258
  warnings = [log for log in self.console_logs if log.get("type") == "warning"]
@@ -143,6 +143,19 @@ class CursorFlow:
143
143
  )
144
144
  summary = self.correlator.get_summary(organized_timeline)
145
145
 
146
+ # Capture comprehensive data if screenshots were taken
147
+ comprehensive_data = {}
148
+ if self.artifacts.get("screenshots"):
149
+ # Get comprehensive data from last screenshot
150
+ last_screenshot = self.artifacts["screenshots"][-1]
151
+ if "comprehensive_data_path" in last_screenshot:
152
+ import json
153
+ try:
154
+ with open(last_screenshot["comprehensive_data_path"], 'r') as f:
155
+ comprehensive_data = json.load(f)
156
+ except Exception as e:
157
+ self.logger.warning(f"Could not load comprehensive data: {e}")
158
+
146
159
  # Package results
147
160
  results = {
148
161
  "success": success,
@@ -152,7 +165,8 @@ class CursorFlow:
152
165
  "browser_events": self.timeline, # Raw browser events
153
166
  "server_logs": server_logs, # Raw server logs
154
167
  "summary": summary, # Basic counts
155
- "artifacts": self.artifacts
168
+ "artifacts": self.artifacts,
169
+ "comprehensive_data": comprehensive_data # Complete page intelligence
156
170
  }
157
171
 
158
172
  self.logger.info(f"Test execution completed: {success}, timeline events: {len(organized_timeline)}")
@@ -164,7 +164,11 @@ class LogCollector:
164
164
  async def _monitor_source(self, source):
165
165
  """Monitor a single log source"""
166
166
  try:
167
- await source.connect()
167
+ # connect() returns bool, not awaitable - just call it
168
+ connected = await source.connect()
169
+ if not connected:
170
+ self.logger.warning(f"Log source {source} failed to connect")
171
+ return
168
172
 
169
173
  while self.monitoring:
170
174
  try:
@@ -168,6 +168,10 @@ class LocalFileLogSource:
168
168
  """Connect to log sources - compatibility method for log_collector"""
169
169
  return await self.start_monitoring()
170
170
 
171
+ async def disconnect(self):
172
+ """Disconnect from log sources - compatibility method for log_collector"""
173
+ return await self.stop_monitoring()
174
+
171
175
  async def get_new_entries(self) -> List[Dict]:
172
176
  """
173
177
  Get new log entries since last call (required interface method)
@@ -165,6 +165,10 @@ class SSHRemoteLogSource:
165
165
  """Connect to SSH log sources - compatibility method for log_collector"""
166
166
  return await self.start_monitoring()
167
167
 
168
+ async def disconnect(self):
169
+ """Disconnect from SSH log sources - compatibility method for log_collector"""
170
+ return await self.stop_monitoring()
171
+
168
172
  async def get_new_entries(self) -> List[Dict]:
169
173
  """
170
174
  Get new log entries since last call (required interface method)
@@ -225,74 +225,69 @@ print(f"Performance metrics: {screenshot_data['performance_data']}")
225
225
  # Playwright trace available at: .cursorflow/artifacts/traces/session.zip
226
226
  ```
227
227
 
228
- ## 🚀 **CursorFlow CLI Usage (v2.1.4)**
228
+ ## 🚀 **CursorFlow CLI Usage**
229
229
 
230
230
  ### **Basic Testing:**
231
231
  ```bash
232
- # Test any URL with comprehensive data capture
233
- cursorflow test --base-url http://localhost:3000 --path "/dashboard"
234
-
235
- # Test with custom actions
236
- cursorflow test \
237
- --base-url http://localhost:3000 \
238
- --actions '[
239
- {"navigate": "/page"},
240
- {"wait_for": "#element"},
241
- {"screenshot": "state"}
242
- ]'
243
-
244
- # 🆕 Parallel responsive testing (mobile, tablet, desktop)
245
- cursorflow test --base-url http://localhost:3000 --path "/dashboard" --responsive
246
-
247
- # 🆕 Enhanced screenshot options
248
- cursorflow test \
249
- --base-url http://localhost:3000 \
250
- --actions '[
251
- {"navigate": "/page"},
252
- {"screenshot": {
253
- "name": "clipped-header",
254
- "options": {
255
- "clip": {"selector": "#header"},
256
- "mask": [".user-email", ".sensitive-data"],
257
- "full_page": false,
258
- "quality": 90
259
- }
260
- }}
261
- ]'
232
+ # Simple page capture
233
+ cursorflow test --base-url http://localhost:3000 --path /dashboard
234
+
235
+ # Inline actions (no JSON needed)
236
+ cursorflow test --base-url http://localhost:3000 \
237
+ --path /messages \
238
+ --wait-for ".message-item" \
239
+ --wait 2 \
240
+ --hover ".message-item:first-child" \
241
+ --click ".message-item:first-child" \
242
+ --screenshot "result" \
243
+ --show-console \
244
+ --open-trace
245
+
246
+ # Custom actions with JSON
247
+ cursorflow test --base-url http://localhost:3000 --actions '[
248
+ {"navigate": "/page"},
249
+ {"hover": ".menu"},
250
+ {"click": "#button"},
251
+ {"screenshot": "result"}
252
+ ]'
253
+ ```
262
254
 
263
- # Results include:
264
- # - Hot Reload Intelligence status
265
- # - Advanced Element Intelligence (7 selector types)
266
- # - Comprehensive Page Analysis (fonts, animations, resources)
267
- # - Enhanced Error Context (smart deduplication)
268
- # - Enhanced Browser Data (Playwright traces)
269
- # - 🆕 Parallel Viewport Analysis (responsive testing)
270
- # - 🆕 Enhanced Screenshot Metadata (options used)
255
+ ### **All CLI Commands:**
256
+ ```bash
257
+ cursorflow test # Test UI with comprehensive data capture
258
+ cursorflow rerun # Re-run last test
259
+ cursorflow inspect # Quick element inspection
260
+ cursorflow count # Count matching elements
261
+ cursorflow timeline # View event timeline
262
+ cursorflow sessions # Manage saved sessions
263
+ cursorflow cleanup # Clean artifacts (use --yes for autonomous)
264
+ cursorflow install-rules # Install Cursor rules (use --yes)
271
265
  ```
272
266
 
273
- ### **Available CLI Commands:**
267
+ ### **Inline Action Flags:**
274
268
  ```bash
275
- cursorflow test # Execute comprehensive UI test
276
- cursorflow compare-mockup # Visual mockup comparison
277
- cursorflow iterate-mockup # Iterative mockup matching
278
- cursorflow install-rules # Install Cursor AI rules
279
- cursorflow update # Update CursorFlow and dependencies
280
- cursorflow --help # Show all commands and options
269
+ --click ".selector" # Click element
270
+ --hover ".selector" # Hover element
271
+ --fill "#input=value" # Fill form field
272
+ --wait 2 # Wait seconds
273
+ --wait-for ".selector" # Wait for element
274
+ --wait-for-network-idle # Wait for network idle
275
+ --screenshot "name" # Capture screenshot
276
+ --show-console # Show console errors
277
+ --open-trace # Auto-open Playwright trace
278
+ --save-session "name" # Save authenticated state (requires auth_config)
279
+ --use-session "name" # Restore authenticated state (requires auth_config)
281
280
  ```
282
281
 
283
- ## Available Actions
284
-
285
- | Action | Syntax | Purpose |
286
- |--------|--------|---------|
287
- | `navigate` | `{"navigate": "/path"}` | Go to URL or path |
288
- | `click` | `{"click": "#selector"}` | Click element |
289
- | `fill` | `{"fill": {"selector": "#input", "value": "text"}}` | Fill form field |
290
- | `wait` | `{"wait": 2}` | Wait seconds |
291
- | `wait_for` | `{"wait_for": "#element"}` | Wait for element |
292
- | `screenshot` | `{"screenshot": "name"}` | Take basic screenshot |
293
- | 🆕 `screenshot` | `{"screenshot": {"name": "test", "options": {"clip": {"selector": "#header"}}}}` | Enhanced screenshot with clipping |
294
- | 🆕 `screenshot` | `{"screenshot": {"name": "test", "options": {"mask": [".sensitive"]}}}` | Screenshot with masked elements |
295
- | 🆕 `screenshot` | `{"screenshot": {"name": "test.jpg", "options": {"quality": 90}}}` | JPEG screenshot with quality |
282
+ ### **Available Actions (94+ via Pass-Through):**
283
+
284
+ CursorFlow passes actions directly to Playwright - ANY Page method works:
285
+ - `click`, `dblclick`, `hover`, `tap`, `press`
286
+ - `fill`, `type`, `check`, `uncheck`, `select_option`
287
+ - `focus`, `blur`, `drag_and_drop`
288
+ - `wait_for_selector`, `wait_for_load_state`, `wait_for_timeout`
289
+ - `goto`, `reload`, `evaluate`, `route`
290
+ - And 80+ more: https://playwright.dev/python/docs/api/class-page
296
291
 
297
292
  ## Common Usage Patterns
298
293
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "cursorflow"
7
- version = "2.2.5"
7
+ version = "2.2.7"
8
8
  description = "🔥 Complete page intelligence for AI-driven development with Hot Reload Intelligence - captures DOM, network, console, performance, HMR events, and comprehensive page analysis"
9
9
  authors = [
10
10
  {name = "GeekWarrior Development", email = "rbush@cooltheory.com"}
File without changes
File without changes
File without changes
File without changes