cursorflow 1.3.6__py3-none-any.whl → 2.0.0__py3-none-any.whl
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/core/browser_controller.py +1367 -80
- cursorflow/core/error_context_collector.py +590 -0
- cursorflow/core/hmr_detector.py +439 -0
- cursorflow/core/mockup_comparator.py +32 -6
- cursorflow/core/trace_manager.py +209 -0
- cursorflow/log_sources/local_file.py +5 -1
- cursorflow/log_sources/ssh_remote.py +7 -2
- cursorflow-2.0.0.dist-info/METADATA +293 -0
- {cursorflow-1.3.6.dist-info → cursorflow-2.0.0.dist-info}/RECORD +13 -10
- cursorflow-1.3.6.dist-info/METADATA +0 -247
- {cursorflow-1.3.6.dist-info → cursorflow-2.0.0.dist-info}/WHEEL +0 -0
- {cursorflow-1.3.6.dist-info → cursorflow-2.0.0.dist-info}/entry_points.txt +0 -0
- {cursorflow-1.3.6.dist-info → cursorflow-2.0.0.dist-info}/licenses/LICENSE +0 -0
- {cursorflow-1.3.6.dist-info → cursorflow-2.0.0.dist-info}/top_level.txt +0 -0
@@ -1,247 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.4
|
2
|
-
Name: cursorflow
|
3
|
-
Version: 1.3.6
|
4
|
-
Summary: Complete page intelligence for AI-driven development - captures DOM, network, console, and performance data
|
5
|
-
Author-email: GeekWarrior Development <rbush@cooltheory.com>
|
6
|
-
License-Expression: MIT
|
7
|
-
Project-URL: Homepage, https://github.com/haley-marketing-group/cursorflow
|
8
|
-
Project-URL: Documentation, https://cursorflow.readthedocs.io
|
9
|
-
Project-URL: Repository, https://github.com/haley-marketing-group/cursorflow
|
10
|
-
Keywords: ui-testing,automation,cursor,ai,web-testing,css-iteration
|
11
|
-
Classifier: Development Status :: 5 - Production/Stable
|
12
|
-
Classifier: Intended Audience :: Developers
|
13
|
-
Classifier: Programming Language :: Python :: 3
|
14
|
-
Classifier: Programming Language :: Python :: 3.8
|
15
|
-
Classifier: Programming Language :: Python :: 3.9
|
16
|
-
Classifier: Programming Language :: Python :: 3.10
|
17
|
-
Classifier: Programming Language :: Python :: 3.11
|
18
|
-
Classifier: Programming Language :: Python :: 3.12
|
19
|
-
Classifier: Topic :: Software Development :: Testing
|
20
|
-
Classifier: Topic :: Software Development :: Quality Assurance
|
21
|
-
Classifier: Framework :: AsyncIO
|
22
|
-
Requires-Python: >=3.8
|
23
|
-
Description-Content-Type: text/markdown
|
24
|
-
License-File: LICENSE
|
25
|
-
Requires-Dist: playwright>=1.40.0
|
26
|
-
Requires-Dist: paramiko>=3.3.1
|
27
|
-
Requires-Dist: pyyaml>=6.0.1
|
28
|
-
Requires-Dist: asyncio-mqtt>=0.11.1
|
29
|
-
Requires-Dist: click>=8.1.7
|
30
|
-
Requires-Dist: rich>=13.6.0
|
31
|
-
Requires-Dist: jinja2>=3.1.2
|
32
|
-
Requires-Dist: python-dateutil>=2.8.2
|
33
|
-
Requires-Dist: watchdog>=3.0.0
|
34
|
-
Requires-Dist: docker>=6.1.3
|
35
|
-
Provides-Extra: dev
|
36
|
-
Requires-Dist: pytest>=7.4.0; extra == "dev"
|
37
|
-
Requires-Dist: pytest-asyncio>=0.21.1; extra == "dev"
|
38
|
-
Requires-Dist: black>=23.9.1; extra == "dev"
|
39
|
-
Requires-Dist: flake8>=6.1.0; extra == "dev"
|
40
|
-
Requires-Dist: mypy>=1.6.1; extra == "dev"
|
41
|
-
Dynamic: license-file
|
42
|
-
|
43
|
-
# CursorFlow
|
44
|
-
|
45
|
-
**Complete page intelligence for AI-driven development**
|
46
|
-
|
47
|
-
CursorFlow captures comprehensive data from web applications - DOM structure, CSS properties, network activity, console logs, and performance metrics - enabling AI agents like Cursor to make intelligent decisions about UI improvements and debugging.
|
48
|
-
|
49
|
-
## 🎯 What CursorFlow Does
|
50
|
-
|
51
|
-
**Data Collection, Not Analysis** - We gather structured data, AI makes the decisions.
|
52
|
-
|
53
|
-
### **📊 Complete Page Intelligence**
|
54
|
-
Every screenshot captures everything:
|
55
|
-
- **DOM**: All elements with exact CSS properties
|
56
|
-
- **Network**: All requests, responses, and timing
|
57
|
-
- **Console**: All logs, errors, and warnings
|
58
|
-
- **Performance**: Load times, memory usage, metrics
|
59
|
-
- **Visual**: Screenshots and pixel-perfect comparisons
|
60
|
-
|
61
|
-
### **🔄 Rapid Iteration Support**
|
62
|
-
- **Mockup comparison** with pixel-level analysis
|
63
|
-
- **Hot reload integration** for instant CSS testing
|
64
|
-
- **Persistent sessions** that survive code changes
|
65
|
-
- **Universal framework support** (React, Vue, PHP, Perl, anything)
|
66
|
-
|
67
|
-
### **🤖 AI-First Design**
|
68
|
-
All data structured for AI consumption:
|
69
|
-
- Consistent JSON format across all features
|
70
|
-
- Element-level CSS properties for precise modifications
|
71
|
-
- Error correlation with timing data
|
72
|
-
- Performance insights with actionable metrics
|
73
|
-
|
74
|
-
## 🚀 Quick Start
|
75
|
-
|
76
|
-
```bash
|
77
|
-
# Install
|
78
|
-
pip install cursorflow
|
79
|
-
|
80
|
-
# Test any page - captures everything automatically
|
81
|
-
cursorflow test --base-url http://localhost:3000 --actions '[
|
82
|
-
{"navigate": "/dashboard"},
|
83
|
-
{"wait_for": "#main-content"},
|
84
|
-
{"screenshot": "dashboard-loaded"}
|
85
|
-
]'
|
86
|
-
|
87
|
-
# Compare mockup to implementation
|
88
|
-
cursorflow compare-mockup https://mockup.com/design --base-url http://localhost:3000
|
89
|
-
```
|
90
|
-
|
91
|
-
## 💻 Usage Examples
|
92
|
-
|
93
|
-
### **Basic Testing**
|
94
|
-
```python
|
95
|
-
from cursorflow import CursorFlow
|
96
|
-
|
97
|
-
flow = CursorFlow(base_url="http://localhost:3000")
|
98
|
-
|
99
|
-
# Every screenshot includes complete page data
|
100
|
-
results = await flow.execute_and_collect([
|
101
|
-
{"navigate": "/dashboard"},
|
102
|
-
{"screenshot": "loaded"} # Captures DOM, network, console, performance
|
103
|
-
])
|
104
|
-
|
105
|
-
# Access structured data for AI analysis
|
106
|
-
screenshot = results['artifacts']['screenshots'][0]
|
107
|
-
elements = screenshot['dom_analysis']['elements'] # All elements + CSS
|
108
|
-
network = screenshot['network_data'] # All requests + timing
|
109
|
-
console = screenshot['console_data'] # All logs + errors
|
110
|
-
```
|
111
|
-
|
112
|
-
### **Mockup Comparison**
|
113
|
-
```python
|
114
|
-
# Compare design to implementation with complete element data
|
115
|
-
results = await flow.compare_mockup_to_implementation(
|
116
|
-
mockup_url="https://mockup.com/design",
|
117
|
-
implementation_url="http://localhost:3000/dashboard"
|
118
|
-
)
|
119
|
-
|
120
|
-
# AI gets exact differences and CSS properties for every element
|
121
|
-
differences = results['layout_analysis']['element_differences']
|
122
|
-
```
|
123
|
-
|
124
|
-
### **CSS Iteration**
|
125
|
-
```python
|
126
|
-
# Test CSS changes with hot reload - no page refresh needed
|
127
|
-
css_changes = [
|
128
|
-
{"name": "spacing", "css": ".container { gap: 2rem; }"},
|
129
|
-
{"name": "colors", "css": ".button { background: blue; }"}
|
130
|
-
]
|
131
|
-
|
132
|
-
results = await flow.css_iteration_persistent(
|
133
|
-
base_actions=[{"navigate": "/page"}],
|
134
|
-
css_changes=css_changes
|
135
|
-
)
|
136
|
-
```
|
137
|
-
|
138
|
-
## 🔧 CLI Commands
|
139
|
-
|
140
|
-
```bash
|
141
|
-
# Test any page with custom actions
|
142
|
-
cursorflow test --base-url http://localhost:3000 --actions '[
|
143
|
-
{"navigate": "/login"},
|
144
|
-
{"fill": {"selector": "#username", "value": "test@example.com"}},
|
145
|
-
{"fill": {"selector": "#password", "value": "password123"}},
|
146
|
-
{"click": "#login-button"},
|
147
|
-
{"wait_for": ".dashboard"},
|
148
|
-
{"screenshot": "logged-in"}
|
149
|
-
]'
|
150
|
-
|
151
|
-
# Simple page test (just navigate and screenshot)
|
152
|
-
cursorflow test --base-url http://localhost:3000 --path "/dashboard"
|
153
|
-
|
154
|
-
# Compare mockup to implementation
|
155
|
-
cursorflow compare-mockup https://mockup.com/design \
|
156
|
-
--base-url http://localhost:3000 \
|
157
|
-
--viewports '[{"width": 1440, "height": 900, "name": "desktop"}]'
|
158
|
-
|
159
|
-
# Iterate on CSS improvements
|
160
|
-
cursorflow iterate-mockup https://mockup.com/design \
|
161
|
-
--base-url http://localhost:3000 \
|
162
|
-
--css-improvements '[
|
163
|
-
{"name": "spacing", "css": ".container { gap: 2rem; }"},
|
164
|
-
{"name": "colors", "css": ".button { background: blue; }"}
|
165
|
-
]'
|
166
|
-
```
|
167
|
-
|
168
|
-
## 🌐 Universal Framework Support
|
169
|
-
|
170
|
-
Works with any web technology:
|
171
|
-
- **Modern**: React, Vue, Angular, Next.js, Svelte
|
172
|
-
- **Traditional**: PHP, Django, Rails, Laravel
|
173
|
-
- **Legacy**: Perl, mod_perl, OpenSAS, Classic ASP
|
174
|
-
- **Any URL**: Local development, staging, production
|
175
|
-
|
176
|
-
## 📊 What AI Gets
|
177
|
-
|
178
|
-
### **Complete Element Data**
|
179
|
-
```json
|
180
|
-
{
|
181
|
-
"tagName": "button",
|
182
|
-
"textContent": "Save Changes",
|
183
|
-
"boundingBox": {"x": 100, "y": 200, "width": 120, "height": 40},
|
184
|
-
"computedStyles": {
|
185
|
-
"backgroundColor": "rgb(0, 123, 255)",
|
186
|
-
"fontSize": "14px",
|
187
|
-
"padding": "8px 16px",
|
188
|
-
"borderRadius": "4px"
|
189
|
-
}
|
190
|
-
}
|
191
|
-
```
|
192
|
-
|
193
|
-
### **Network Activity**
|
194
|
-
```json
|
195
|
-
{
|
196
|
-
"network_summary": {
|
197
|
-
"total_requests": 23,
|
198
|
-
"failed_requests": 2,
|
199
|
-
"average_response_time": 145.5
|
200
|
-
},
|
201
|
-
"failed_requests": [
|
202
|
-
{"url": "/api/data", "status": 404, "timing": 1250}
|
203
|
-
]
|
204
|
-
}
|
205
|
-
```
|
206
|
-
|
207
|
-
### **Console Intelligence**
|
208
|
-
```json
|
209
|
-
{
|
210
|
-
"console_summary": {
|
211
|
-
"error_count": 1,
|
212
|
-
"warning_count": 2
|
213
|
-
},
|
214
|
-
"errors": [
|
215
|
-
{"text": "Cannot read property 'id' of undefined", "location": "app.js:42"}
|
216
|
-
]
|
217
|
-
}
|
218
|
-
```
|
219
|
-
|
220
|
-
## 📚 Documentation
|
221
|
-
|
222
|
-
**[📖 Complete User Manual](docs/USER_MANUAL.md)** - Everything you need:
|
223
|
-
- Installation and setup
|
224
|
-
- All features and examples
|
225
|
-
- CLI commands and Python API
|
226
|
-
- Troubleshooting guide
|
227
|
-
|
228
|
-
## 🎯 Perfect for AI Development
|
229
|
-
|
230
|
-
CursorFlow is designed specifically for AI agents:
|
231
|
-
- **Complete data collection** - AI gets full context
|
232
|
-
- **Structured output** - Consistent JSON format
|
233
|
-
- **No analysis** - We collect, AI decides
|
234
|
-
- **Rapid iteration** - Fast feedback loops
|
235
|
-
- **Universal compatibility** - Works with any web app
|
236
|
-
|
237
|
-
## Installation
|
238
|
-
|
239
|
-
```bash
|
240
|
-
pip install cursorflow
|
241
|
-
```
|
242
|
-
|
243
|
-
Browser dependencies install automatically on first use.
|
244
|
-
|
245
|
-
---
|
246
|
-
|
247
|
-
**CursorFlow: The data collection engine that powers AI-driven web development.** 🚀
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|