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.
- {cursorflow-2.1.5 → cursorflow-2.2.0}/FIRST_TIME_SETUP.md +10 -7
- {cursorflow-2.1.5 → cursorflow-2.2.0}/PKG-INFO +70 -15
- {cursorflow-2.1.5 → cursorflow-2.2.0}/README.md +69 -14
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/__init__.py +1 -1
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/auto_init.py +17 -13
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/cli.py +389 -23
- cursorflow-2.2.0/cursorflow/core/action_validator.py +199 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/browser_controller.py +300 -5
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/browser_engine.py +13 -0
- cursorflow-2.2.0/cursorflow/core/config_validator.py +216 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/cursorflow.py +68 -32
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/install_cursorflow_rules.py +14 -11
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/log_sources/local_file.py +20 -1
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/log_sources/ssh_remote.py +19 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/rules/cursorflow-installation.mdc +2 -1
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/rules/cursorflow-usage.mdc +7 -1
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/updater.py +4 -3
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow.egg-info/SOURCES.txt +2 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/pyproject.toml +1 -1
- {cursorflow-2.1.5 → cursorflow-2.2.0}/LICENSE +0 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/MANIFEST.in +0 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/POST_INSTALL_MESSAGE.txt +0 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/auto_updater.py +0 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/agent.py +0 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/auth_handler.py +0 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/css_iterator.py +0 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/cursor_integration.py +0 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/error_context_collector.py +0 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/error_correlator.py +0 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/event_correlator.py +0 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/file_change_monitor.py +0 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/hmr_detector.py +0 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/log_collector.py +0 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/log_monitor.py +0 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/mockup_comparator.py +0 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/persistent_session.py +0 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/report_generator.py +0 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/core/trace_manager.py +0 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/post_install.py +0 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/cursorflow/rules/__init__.py +0 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/docs/USER_MANUAL.md +0 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/examples/comprehensive_screenshot_example.py +0 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/examples/enhanced_screenshot_example.py +0 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/examples/mockup_comparison_example.py +0 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/examples/opensas_example.py +0 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/examples/react_example.py +0 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/examples/responsive_testing_example.py +0 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/examples/v2_comprehensive_demo.py +0 -0
- {cursorflow-2.1.5 → cursorflow-2.2.0}/setup.cfg +0 -0
- {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
|
-
-
|
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
|
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
|
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
|
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
|
-
-
|
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.
|
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
|
124
|
+
Every test captures everything needed for debugging:
|
88
125
|
|
89
126
|
### **📊 Comprehensive Data Collection**
|
90
|
-
- **DOM**: All elements with 7 selector strategies
|
91
|
-
- **Network**:
|
92
|
-
- **Console**: All logs, errors,
|
93
|
-
- **
|
94
|
-
- **
|
95
|
-
- **
|
96
|
-
- **
|
97
|
-
- **
|
98
|
-
- **
|
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
|
-
-
|
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
|
-
|
162
|
-
|
203
|
+
cursorflow test --base-url http://localhost:3000 --path /dashboard
|
204
|
+
```
|
163
205
|
|
164
|
-
|
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
|
79
|
+
Every test captures everything needed for debugging:
|
43
80
|
|
44
81
|
### **📊 Comprehensive Data Collection**
|
45
|
-
- **DOM**: All elements with 7 selector strategies
|
46
|
-
- **Network**:
|
47
|
-
- **Console**: All logs, errors,
|
48
|
-
- **
|
49
|
-
- **
|
50
|
-
- **
|
51
|
-
- **
|
52
|
-
- **
|
53
|
-
- **
|
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
|
-
-
|
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
|
-
|
117
|
-
|
158
|
+
cursorflow test --base-url http://localhost:3000 --path /dashboard
|
159
|
+
```
|
118
160
|
|
119
|
-
|
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"}},
|
@@ -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
|
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
|
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
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
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
|
117
|
+
║ • .cursorflow/config.json (project configuration) ║
|
114
118
|
║ • .cursorflow/ (artifacts and sessions) ║
|
115
119
|
║ • .gitignore entries ║
|
116
120
|
║ ║
|