cursorflow 2.1.5__tar.gz → 2.2.0__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.1.5 → cursorflow-2.2.0}/FIRST_TIME_SETUP.md +10 -7
  2. {cursorflow-2.1.5 → cursorflow-2.2.0}/PKG-INFO +70 -15
  3. {cursorflow-2.1.5 → cursorflow-2.2.0}/README.md +69 -14
  4. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/__init__.py +1 -1
  5. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/auto_init.py +17 -13
  6. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/cli.py +389 -23
  7. cursorflow-2.2.0/cursorflow/core/action_validator.py +199 -0
  8. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/browser_controller.py +300 -5
  9. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/browser_engine.py +13 -0
  10. cursorflow-2.2.0/cursorflow/core/config_validator.py +216 -0
  11. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/cursorflow.py +68 -32
  12. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/install_cursorflow_rules.py +14 -11
  13. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/log_sources/local_file.py +20 -1
  14. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/log_sources/ssh_remote.py +19 -0
  15. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/rules/cursorflow-installation.mdc +2 -1
  16. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/rules/cursorflow-usage.mdc +7 -1
  17. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/updater.py +4 -3
  18. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow.egg-info/SOURCES.txt +2 -0
  19. {cursorflow-2.1.5 → cursorflow-2.2.0}/pyproject.toml +1 -1
  20. {cursorflow-2.1.5 → cursorflow-2.2.0}/LICENSE +0 -0
  21. {cursorflow-2.1.5 → cursorflow-2.2.0}/MANIFEST.in +0 -0
  22. {cursorflow-2.1.5 → cursorflow-2.2.0}/POST_INSTALL_MESSAGE.txt +0 -0
  23. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/auto_updater.py +0 -0
  24. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/agent.py +0 -0
  25. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/auth_handler.py +0 -0
  26. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/css_iterator.py +0 -0
  27. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/cursor_integration.py +0 -0
  28. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/error_context_collector.py +0 -0
  29. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/error_correlator.py +0 -0
  30. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/event_correlator.py +0 -0
  31. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/file_change_monitor.py +0 -0
  32. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/hmr_detector.py +0 -0
  33. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/log_collector.py +0 -0
  34. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/log_monitor.py +0 -0
  35. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/mockup_comparator.py +0 -0
  36. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/persistent_session.py +0 -0
  37. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/report_generator.py +0 -0
  38. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/trace_manager.py +0 -0
  39. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/post_install.py +0 -0
  40. {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/rules/__init__.py +0 -0
  41. {cursorflow-2.1.5 → cursorflow-2.2.0}/docs/USER_MANUAL.md +0 -0
  42. {cursorflow-2.1.5 → cursorflow-2.2.0}/examples/comprehensive_screenshot_example.py +0 -0
  43. {cursorflow-2.1.5 → cursorflow-2.2.0}/examples/enhanced_screenshot_example.py +0 -0
  44. {cursorflow-2.1.5 → cursorflow-2.2.0}/examples/mockup_comparison_example.py +0 -0
  45. {cursorflow-2.1.5 → cursorflow-2.2.0}/examples/opensas_example.py +0 -0
  46. {cursorflow-2.1.5 → cursorflow-2.2.0}/examples/react_example.py +0 -0
  47. {cursorflow-2.1.5 → cursorflow-2.2.0}/examples/responsive_testing_example.py +0 -0
  48. {cursorflow-2.1.5 → cursorflow-2.2.0}/examples/v2_comprehensive_demo.py +0 -0
  49. {cursorflow-2.1.5 → cursorflow-2.2.0}/setup.cfg +0 -0
  50. {cursorflow-2.1.5 → cursorflow-2.2.0}/setup.py +0 -0
@@ -23,13 +23,16 @@ This sets up CursorFlow in your specific project:
23
23
  ```bash
24
24
  cd /path/to/your/project
25
25
  cursorflow install-rules
26
+
27
+ # Or for automation/CI (skip prompts)
28
+ cursorflow install-rules --yes
26
29
  ```
27
30
 
28
31
  **What this creates:**
29
32
  - `.cursor/rules/` - Cursor AI integration rules (tells Cursor how to use CursorFlow)
30
- - `cursorflow-config.json` - Project-specific settings (base URL, log paths, etc.)
33
+ - `.cursorflow/config.json` - Project-specific settings (base URL, log paths, etc.)
31
34
  - `.cursorflow/` - Artifacts directory (screenshots, sessions, test results)
32
- - `.gitignore` entries - Excludes CursorFlow artifacts from version control
35
+ - `.gitignore` entries - Excludes entire `.cursorflow/` directory from version control
33
36
 
34
37
  ## 🤔 Why Two Steps?
35
38
 
@@ -68,7 +71,7 @@ Copies usage rules that teach Cursor AI how to use CursorFlow:
68
71
  - `cursorflow-usage.mdc` - How to run tests and analyze results
69
72
  - `cursorflow-installation.mdc` - Installation and setup guidance
70
73
 
71
- ### 2. Configuration Template (`cursorflow-config.json`)
74
+ ### 2. Configuration File (`.cursorflow/config.json`)
72
75
  Auto-detects your project type and creates smart defaults:
73
76
 
74
77
  ```json
@@ -102,10 +105,10 @@ your-project/
102
105
  │ ├── cursorflow-usage.mdc
103
106
  │ └── cursorflow-installation.mdc
104
107
  ├── .cursorflow/
108
+ │ ├── config.json
105
109
  │ ├── artifacts/
106
110
  │ ├── sessions/
107
111
  │ └── version_info.json
108
- ├── cursorflow-config.json
109
112
  └── .gitignore (updated with CursorFlow entries)
110
113
  ```
111
114
 
@@ -155,7 +158,7 @@ cursorflow --version
155
158
  ls -la .cursor/rules/
156
159
  # Should show: cursorflow-usage.mdc, cursorflow-installation.mdc
157
160
 
158
- ls -la cursorflow-config.json
161
+ ls -la .cursorflow/config.json
159
162
  # Should exist
160
163
 
161
164
  ls -la .cursorflow/
@@ -199,9 +202,9 @@ ls -la .cursorflow/
199
202
  - [ ] Run tests
200
203
 
201
204
  3. **Version control:**
202
- - Commit `cursorflow-config.json` (team settings)
203
- - ❌ Don't commit `.cursorflow/` (artifacts, generated per-developer)
205
+ - Don't commit `.cursorflow/` (config, artifacts, all per-developer)
204
206
  - ✅ Commit `.cursor/rules/` (Cursor AI integration)
207
+ - 💡 Each dev runs `cursorflow install-rules` to create their own config
205
208
 
206
209
  ## 🎯 Remember
207
210
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cursorflow
3
- Version: 2.1.5
3
+ Version: 2.2.0
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
@@ -82,20 +82,57 @@ When CursorFlow reports `"average_response_time": 416.58ms`, you can tell stakeh
82
82
 
83
83
  **Documentary vs Movie:** Both are valuable, but if you're trying to understand reality, you watch the documentary. CursorFlow is the documentary of web testing.
84
84
 
85
+ ## 🎯 Pass-Through Architecture
86
+
87
+ CursorFlow doesn't limit you - it exposes the full power of Playwright:
88
+
89
+ **94+ Playwright actions available:**
90
+ ```bash
91
+ # Any Playwright Page method works
92
+ cursorflow test --actions '[
93
+ {"hover": ".menu"},
94
+ {"dblclick": ".editable"},
95
+ {"press": "Enter"},
96
+ {"drag_and_drop": {"source": ".item", "target": ".zone"}},
97
+ {"check": "#checkbox"},
98
+ {"evaluate": "window.scrollTo(0, 500)"}
99
+ ]'
100
+ ```
101
+
102
+ **Full configuration pass-through:**
103
+ ```json
104
+ {
105
+ "browser_config": {
106
+ "browser_launch_options": {"devtools": true, "channel": "chrome"}
107
+ },
108
+ "context_options": {
109
+ "color_scheme": "dark",
110
+ "geolocation": {"latitude": 40.7128, "longitude": -74.0060},
111
+ "timezone_id": "America/Los_Angeles"
112
+ }
113
+ }
114
+ ```
115
+
116
+ **Forward-compatible:** New Playwright features work immediately without CursorFlow updates.
117
+
118
+ **See:** [Playwright API Documentation](https://playwright.dev/python/docs/api/class-page)
119
+
120
+ ---
121
+
85
122
  ## 🚀 Complete Page Intelligence
86
123
 
87
- Every screenshot captures everything your AI needs to make intelligent decisions:
124
+ Every test captures everything needed for debugging:
88
125
 
89
126
  ### **📊 Comprehensive Data Collection**
90
- - **DOM**: All elements with 7 selector strategies each
91
- - **Network**: All requests, responses, and complete response bodies
92
- - **Console**: All logs, errors, and smart error correlation
93
- - **Performance**: Load times, memory usage, with reliability indicators
94
- - **Visual**: Screenshots with pixel-perfect comparisons and enhanced options
95
- - **Fonts**: Loading status, performance, and usage analysis
96
- - **Animations**: Active animations and transitions tracking
97
- - **Resources**: Complete resource loading analysis
98
- - **Storage**: localStorage, sessionStorage, cookies, IndexedDB state
127
+ - **DOM**: All elements with 7 selector strategies + event handlers
128
+ - **Network**: Requests, responses, and complete request/response bodies
129
+ - **Console**: All logs, errors, warnings - displayed prominently
130
+ - **JavaScript**: Global functions, variables, specific window objects
131
+ - **Storage**: localStorage, sessionStorage, cookies (sensitive data masked)
132
+ - **Forms**: All field values at capture time (passwords masked)
133
+ - **Performance**: Load times, memory usage, reliability indicators
134
+ - **Visual**: Screenshots with comprehensive page analysis
135
+ - **Sessions**: Save/restore browser state for authenticated testing
99
136
 
100
137
  ### **🔄 Hot Reload Intelligence**
101
138
  - **Framework auto-detection** (Vite, Webpack, Next.js, Parcel, Laravel Mix)
@@ -148,20 +185,38 @@ playwright install chromium
148
185
  ```bash
149
186
  cd /path/to/your/project
150
187
  cursorflow install-rules
188
+
189
+ # Or skip prompts for automation/CI
190
+ cursorflow install-rules --yes
151
191
  ```
152
192
 
153
193
  This creates:
154
194
  - `.cursor/rules/` - Cursor AI integration rules
155
- - `cursorflow-config.json` - Project-specific configuration
195
+ - `.cursorflow/config.json` - Project-specific configuration
156
196
  - `.cursorflow/` - Artifacts and session storage
157
197
  - `.gitignore` entries for CursorFlow artifacts
158
198
 
159
199
  ### Step 3: Start Testing
200
+
201
+ **Simple page capture:**
160
202
  ```bash
161
- # Test real application behavior
162
- cursorflow test --base-url http://localhost:3000 --path "/dashboard"
203
+ cursorflow test --base-url http://localhost:3000 --path /dashboard
204
+ ```
163
205
 
164
- # Get complete intelligence with custom actions
206
+ **Interactive testing with inline actions:**
207
+ ```bash
208
+ cursorflow test --base-url http://localhost:3000 \
209
+ --path /messages \
210
+ --wait-for ".message-item" \
211
+ --hover ".message-item:first-child" \
212
+ --click ".message-item:first-child" \
213
+ --screenshot "clicked" \
214
+ --show-console \
215
+ --open-trace
216
+ ```
217
+
218
+ **Custom actions with JSON:**
219
+ ```bash
165
220
  cursorflow test --base-url http://localhost:3000 --actions '[
166
221
  {"navigate": "/login"},
167
222
  {"fill": {"selector": "#email", "value": "test@example.com"}},
@@ -37,20 +37,57 @@ When CursorFlow reports `"average_response_time": 416.58ms`, you can tell stakeh
37
37
 
38
38
  **Documentary vs Movie:** Both are valuable, but if you're trying to understand reality, you watch the documentary. CursorFlow is the documentary of web testing.
39
39
 
40
+ ## 🎯 Pass-Through Architecture
41
+
42
+ CursorFlow doesn't limit you - it exposes the full power of Playwright:
43
+
44
+ **94+ Playwright actions available:**
45
+ ```bash
46
+ # Any Playwright Page method works
47
+ cursorflow test --actions '[
48
+ {"hover": ".menu"},
49
+ {"dblclick": ".editable"},
50
+ {"press": "Enter"},
51
+ {"drag_and_drop": {"source": ".item", "target": ".zone"}},
52
+ {"check": "#checkbox"},
53
+ {"evaluate": "window.scrollTo(0, 500)"}
54
+ ]'
55
+ ```
56
+
57
+ **Full configuration pass-through:**
58
+ ```json
59
+ {
60
+ "browser_config": {
61
+ "browser_launch_options": {"devtools": true, "channel": "chrome"}
62
+ },
63
+ "context_options": {
64
+ "color_scheme": "dark",
65
+ "geolocation": {"latitude": 40.7128, "longitude": -74.0060},
66
+ "timezone_id": "America/Los_Angeles"
67
+ }
68
+ }
69
+ ```
70
+
71
+ **Forward-compatible:** New Playwright features work immediately without CursorFlow updates.
72
+
73
+ **See:** [Playwright API Documentation](https://playwright.dev/python/docs/api/class-page)
74
+
75
+ ---
76
+
40
77
  ## 🚀 Complete Page Intelligence
41
78
 
42
- Every screenshot captures everything your AI needs to make intelligent decisions:
79
+ Every test captures everything needed for debugging:
43
80
 
44
81
  ### **📊 Comprehensive Data Collection**
45
- - **DOM**: All elements with 7 selector strategies each
46
- - **Network**: All requests, responses, and complete response bodies
47
- - **Console**: All logs, errors, and smart error correlation
48
- - **Performance**: Load times, memory usage, with reliability indicators
49
- - **Visual**: Screenshots with pixel-perfect comparisons and enhanced options
50
- - **Fonts**: Loading status, performance, and usage analysis
51
- - **Animations**: Active animations and transitions tracking
52
- - **Resources**: Complete resource loading analysis
53
- - **Storage**: localStorage, sessionStorage, cookies, IndexedDB state
82
+ - **DOM**: All elements with 7 selector strategies + event handlers
83
+ - **Network**: Requests, responses, and complete request/response bodies
84
+ - **Console**: All logs, errors, warnings - displayed prominently
85
+ - **JavaScript**: Global functions, variables, specific window objects
86
+ - **Storage**: localStorage, sessionStorage, cookies (sensitive data masked)
87
+ - **Forms**: All field values at capture time (passwords masked)
88
+ - **Performance**: Load times, memory usage, reliability indicators
89
+ - **Visual**: Screenshots with comprehensive page analysis
90
+ - **Sessions**: Save/restore browser state for authenticated testing
54
91
 
55
92
  ### **🔄 Hot Reload Intelligence**
56
93
  - **Framework auto-detection** (Vite, Webpack, Next.js, Parcel, Laravel Mix)
@@ -103,20 +140,38 @@ playwright install chromium
103
140
  ```bash
104
141
  cd /path/to/your/project
105
142
  cursorflow install-rules
143
+
144
+ # Or skip prompts for automation/CI
145
+ cursorflow install-rules --yes
106
146
  ```
107
147
 
108
148
  This creates:
109
149
  - `.cursor/rules/` - Cursor AI integration rules
110
- - `cursorflow-config.json` - Project-specific configuration
150
+ - `.cursorflow/config.json` - Project-specific configuration
111
151
  - `.cursorflow/` - Artifacts and session storage
112
152
  - `.gitignore` entries for CursorFlow artifacts
113
153
 
114
154
  ### Step 3: Start Testing
155
+
156
+ **Simple page capture:**
115
157
  ```bash
116
- # Test real application behavior
117
- cursorflow test --base-url http://localhost:3000 --path "/dashboard"
158
+ cursorflow test --base-url http://localhost:3000 --path /dashboard
159
+ ```
118
160
 
119
- # Get complete intelligence with custom actions
161
+ **Interactive testing with inline actions:**
162
+ ```bash
163
+ cursorflow test --base-url http://localhost:3000 \
164
+ --path /messages \
165
+ --wait-for ".message-item" \
166
+ --hover ".message-item:first-child" \
167
+ --click ".message-item:first-child" \
168
+ --screenshot "clicked" \
169
+ --show-console \
170
+ --open-trace
171
+ ```
172
+
173
+ **Custom actions with JSON:**
174
+ ```bash
120
175
  cursorflow test --base-url http://localhost:3000 --actions '[
121
176
  {"navigate": "/login"},
122
177
  {"fill": {"selector": "#email", "value": "test@example.com"}},
@@ -56,7 +56,7 @@ def _get_version():
56
56
  pass
57
57
 
58
58
  # Fallback version - should match pyproject.toml
59
- return "2.1.5"
59
+ return "2.2.0"
60
60
 
61
61
  __version__ = _get_version()
62
62
  __author__ = "GeekWarrior Development"
@@ -17,7 +17,7 @@ def is_project_initialized(project_dir: Optional[str] = None) -> bool:
17
17
 
18
18
  Returns True if:
19
19
  - .cursor/rules/ contains CursorFlow rules
20
- - cursorflow-config.json exists
20
+ - .cursorflow/config.json exists
21
21
  - .cursorflow/ directory exists
22
22
  """
23
23
  if project_dir is None:
@@ -27,8 +27,7 @@ def is_project_initialized(project_dir: Optional[str] = None) -> bool:
27
27
 
28
28
  # Check for key indicators
29
29
  has_rules = (project_path / ".cursor" / "rules" / "cursorflow-usage.mdc").exists()
30
- has_config = (project_path / "cursorflow-config.json").exists()
31
- has_artifacts_dir = (project_path / ".cursorflow").exists()
30
+ has_config = (project_path / ".cursorflow" / "config.json").exists()
32
31
 
33
32
  # Need at least rules and config
34
33
  return has_rules and has_config
@@ -64,15 +63,20 @@ def auto_initialize_if_needed(project_dir: Optional[str] = None, interactive: bo
64
63
  return False
65
64
 
66
65
  # Interactive mode: ask user
67
- print("\n🎯 CursorFlow is not initialized in this project yet.")
68
- print(f"📁 Project directory: {project_path}")
69
- print("\nTo use CursorFlow, we need to set up:")
70
- print(" • Cursor AI rules in .cursor/rules/")
71
- print(" • Configuration file: cursorflow-config.json")
72
- print(" Artifacts directory: .cursorflow/")
73
- print(" .gitignore entries for CursorFlow artifacts")
74
-
75
- response = input("\n🚀 Initialize CursorFlow now? [Y/n]: ").strip().lower()
66
+ if not sys.stdin.isatty():
67
+ # Non-interactive environment (CI, pipes, etc) - auto-accept
68
+ print("🎯 CursorFlow not initialized. Auto-initializing (non-interactive mode)...")
69
+ response = 'y'
70
+ else:
71
+ print("\n🎯 CursorFlow is not initialized in this project yet.")
72
+ print(f"📁 Project directory: {project_path}")
73
+ print("\nTo use CursorFlow, we need to set up:")
74
+ print(" Cursor AI rules in .cursor/rules/")
75
+ print(" • Configuration file: .cursorflow/config.json")
76
+ print(" • Artifacts directory: .cursorflow/")
77
+ print(" • .gitignore entries for CursorFlow artifacts")
78
+
79
+ response = input("\n🚀 Initialize CursorFlow now? [Y/n]: ").strip().lower()
76
80
 
77
81
  if response in ('', 'y', 'yes'):
78
82
  try:
@@ -110,7 +114,7 @@ def get_initialization_warning() -> str:
110
114
  ║ ║
111
115
  ║ This creates: ║
112
116
  ║ • .cursor/rules/ (Cursor AI integration) ║
113
- ║ • cursorflow-config.json (project configuration)
117
+ ║ • .cursorflow/config.json (project configuration)
114
118
  ║ • .cursorflow/ (artifacts and sessions) ║
115
119
  ║ • .gitignore entries ║
116
120
  ║ ║