cursorflow 1.2.0__tar.gz → 1.3.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 (43) hide show
  1. cursorflow-1.3.0/LICENSE +21 -0
  2. cursorflow-1.3.0/MANIFEST.in +64 -0
  3. cursorflow-1.3.0/PKG-INFO +226 -0
  4. cursorflow-1.3.0/README.md +184 -0
  5. {cursorflow-1.2.0 → cursorflow-1.3.0}/cursorflow/cli.py +212 -0
  6. cursorflow-1.3.0/cursorflow/core/browser_controller.py +1186 -0
  7. cursorflow-1.3.0/cursorflow/core/cursor_integration.py +1532 -0
  8. {cursorflow-1.2.0 → cursorflow-1.3.0}/cursorflow/core/cursorflow.py +151 -0
  9. cursorflow-1.3.0/cursorflow/core/mockup_comparator.py +1316 -0
  10. {cursorflow-1.2.0 → cursorflow-1.3.0}/cursorflow.egg-info/SOURCES.txt +9 -7
  11. cursorflow-1.3.0/docs/USER_MANUAL.md +396 -0
  12. cursorflow-1.3.0/examples/comprehensive_screenshot_example.py +275 -0
  13. cursorflow-1.3.0/examples/mockup_comparison_example.py +301 -0
  14. cursorflow-1.3.0/examples/opensas_example.py +144 -0
  15. cursorflow-1.3.0/examples/react_example.py +127 -0
  16. {cursorflow-1.2.0 → cursorflow-1.3.0}/pyproject.toml +4 -5
  17. cursorflow-1.2.0/PKG-INFO +0 -444
  18. cursorflow-1.2.0/README.md +0 -403
  19. cursorflow-1.2.0/cursorflow/core/browser_controller.py +0 -534
  20. cursorflow-1.2.0/cursorflow/core/cursor_integration.py +0 -744
  21. cursorflow-1.2.0/cursorflow.egg-info/PKG-INFO +0 -444
  22. cursorflow-1.2.0/cursorflow.egg-info/dependency_links.txt +0 -1
  23. cursorflow-1.2.0/cursorflow.egg-info/entry_points.txt +0 -2
  24. cursorflow-1.2.0/cursorflow.egg-info/requires.txt +0 -17
  25. cursorflow-1.2.0/cursorflow.egg-info/top_level.txt +0 -1
  26. {cursorflow-1.2.0 → cursorflow-1.3.0}/cursorflow/__init__.py +0 -0
  27. {cursorflow-1.2.0 → cursorflow-1.3.0}/cursorflow/auto_updater.py +0 -0
  28. {cursorflow-1.2.0 → cursorflow-1.3.0}/cursorflow/core/agent.py +0 -0
  29. {cursorflow-1.2.0 → cursorflow-1.3.0}/cursorflow/core/auth_handler.py +0 -0
  30. {cursorflow-1.2.0 → cursorflow-1.3.0}/cursorflow/core/browser_engine.py +0 -0
  31. {cursorflow-1.2.0 → cursorflow-1.3.0}/cursorflow/core/css_iterator.py +0 -0
  32. {cursorflow-1.2.0 → cursorflow-1.3.0}/cursorflow/core/error_correlator.py +0 -0
  33. {cursorflow-1.2.0 → cursorflow-1.3.0}/cursorflow/core/event_correlator.py +0 -0
  34. {cursorflow-1.2.0 → cursorflow-1.3.0}/cursorflow/core/file_change_monitor.py +0 -0
  35. {cursorflow-1.2.0 → cursorflow-1.3.0}/cursorflow/core/log_collector.py +0 -0
  36. {cursorflow-1.2.0 → cursorflow-1.3.0}/cursorflow/core/log_monitor.py +0 -0
  37. {cursorflow-1.2.0 → cursorflow-1.3.0}/cursorflow/core/persistent_session.py +0 -0
  38. {cursorflow-1.2.0 → cursorflow-1.3.0}/cursorflow/core/report_generator.py +0 -0
  39. {cursorflow-1.2.0 → cursorflow-1.3.0}/cursorflow/log_sources/local_file.py +0 -0
  40. {cursorflow-1.2.0 → cursorflow-1.3.0}/cursorflow/log_sources/ssh_remote.py +0 -0
  41. {cursorflow-1.2.0 → cursorflow-1.3.0}/cursorflow/updater.py +0 -0
  42. {cursorflow-1.2.0 → cursorflow-1.3.0}/setup.cfg +0 -0
  43. {cursorflow-1.2.0 → cursorflow-1.3.0}/setup.py +0 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 GeekWarrior Development
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,64 @@
1
+ # CursorFlow PyPI Package Manifest
2
+ # Controls exactly what gets included in the published package
3
+
4
+ # INCLUDE: Essential files for users
5
+ include README.md
6
+ include LICENSE
7
+ include pyproject.toml
8
+ include setup.py
9
+
10
+ # INCLUDE: Core package code (automatically included by setuptools)
11
+ recursive-include cursorflow *.py
12
+
13
+ # INCLUDE: Essential examples for users
14
+ include examples/react_example.py
15
+ include examples/opensas_example.py
16
+ include examples/mockup_comparison_example.py
17
+ include examples/comprehensive_screenshot_example.py
18
+
19
+ # INCLUDE: Single comprehensive user manual
20
+ include docs/USER_MANUAL.md
21
+
22
+ # EXCLUDE: Development and internal documentation
23
+ exclude docs/README.md
24
+ exclude docs/development/*
25
+ exclude docs/product/*
26
+ exclude docs/api/*
27
+ exclude docs/examples/*
28
+
29
+ # EXCLUDE: Development files and directories
30
+ exclude .gitignore
31
+ exclude .github/*
32
+ exclude tests/*
33
+ exclude scripts/*
34
+ exclude venv/*
35
+ exclude dist/*
36
+ exclude build/*
37
+ exclude *.egg-info/*
38
+ exclude .pytest_cache/*
39
+ exclude __pycache__/*
40
+ recursive-exclude * __pycache__
41
+ recursive-exclude * *.py[co]
42
+
43
+ # EXCLUDE: Configuration and rules (internal use)
44
+ exclude config/*
45
+ exclude rules/*
46
+ exclude install_cursorflow_rules.py
47
+ exclude PERSISTENT_SESSION_SUMMARY.md
48
+
49
+ # EXCLUDE: Artifacts and temporary files
50
+ exclude artifacts/*
51
+ exclude .cursorflow/*
52
+ exclude *.log
53
+ exclude *.tmp
54
+
55
+ # EXCLUDE: IDE and editor files
56
+ exclude .vscode/*
57
+ exclude .idea/*
58
+ exclude *.swp
59
+ exclude *.swo
60
+ exclude *~
61
+
62
+ # EXCLUDE: OS files
63
+ exclude .DS_Store
64
+ exclude Thumbs.db
@@ -0,0 +1,226 @@
1
+ Metadata-Version: 2.4
2
+ Name: cursorflow
3
+ Version: 1.3.0
4
+ Summary: Complete page intelligence for AI-driven development - captures DOM, network, console, and performance data
5
+ Author-email: GeekWarrior Development <support@cursorflow.dev>
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 component - captures everything automatically
81
+ cursorflow test dashboard --base-url http://localhost:3000
82
+
83
+ # Compare mockup to implementation
84
+ cursorflow compare-mockup https://mockup.com/design --base-url http://localhost:3000
85
+ ```
86
+
87
+ ## 💻 Usage Examples
88
+
89
+ ### **Basic Testing**
90
+ ```python
91
+ from cursorflow import CursorFlow
92
+
93
+ flow = CursorFlow(base_url="http://localhost:3000")
94
+
95
+ # Every screenshot includes complete page data
96
+ results = await flow.execute_and_collect([
97
+ {"navigate": "/dashboard"},
98
+ {"screenshot": "loaded"} # Captures DOM, network, console, performance
99
+ ])
100
+
101
+ # Access structured data for AI analysis
102
+ screenshot = results['artifacts']['screenshots'][0]
103
+ elements = screenshot['dom_analysis']['elements'] # All elements + CSS
104
+ network = screenshot['network_data'] # All requests + timing
105
+ console = screenshot['console_data'] # All logs + errors
106
+ ```
107
+
108
+ ### **Mockup Comparison**
109
+ ```python
110
+ # Compare design to implementation with complete element data
111
+ results = await flow.compare_mockup_to_implementation(
112
+ mockup_url="https://mockup.com/design",
113
+ implementation_url="http://localhost:3000/dashboard"
114
+ )
115
+
116
+ # AI gets exact differences and CSS properties for every element
117
+ differences = results['layout_analysis']['element_differences']
118
+ ```
119
+
120
+ ### **CSS Iteration**
121
+ ```python
122
+ # Test CSS changes with hot reload - no page refresh needed
123
+ css_changes = [
124
+ {"name": "spacing", "css": ".container { gap: 2rem; }"},
125
+ {"name": "colors", "css": ".button { background: blue; }"}
126
+ ]
127
+
128
+ results = await flow.css_iteration_persistent(
129
+ base_actions=[{"navigate": "/page"}],
130
+ css_changes=css_changes
131
+ )
132
+ ```
133
+
134
+ ## 🔧 CLI Commands
135
+
136
+ ```bash
137
+ # Test component with complete data capture
138
+ cursorflow test component --base-url http://localhost:3000
139
+
140
+ # Compare mockup to implementation
141
+ cursorflow compare-mockup https://mockup.com/design --base-url http://localhost:3000
142
+
143
+ # Iterate on CSS improvements
144
+ cursorflow iterate-mockup https://mockup.com/design --base-url http://localhost:3000
145
+ ```
146
+
147
+ ## 🌐 Universal Framework Support
148
+
149
+ Works with any web technology:
150
+ - **Modern**: React, Vue, Angular, Next.js, Svelte
151
+ - **Traditional**: PHP, Django, Rails, Laravel
152
+ - **Legacy**: Perl, mod_perl, OpenSAS, Classic ASP
153
+ - **Any URL**: Local development, staging, production
154
+
155
+ ## 📊 What AI Gets
156
+
157
+ ### **Complete Element Data**
158
+ ```json
159
+ {
160
+ "tagName": "button",
161
+ "textContent": "Save Changes",
162
+ "boundingBox": {"x": 100, "y": 200, "width": 120, "height": 40},
163
+ "computedStyles": {
164
+ "backgroundColor": "rgb(0, 123, 255)",
165
+ "fontSize": "14px",
166
+ "padding": "8px 16px",
167
+ "borderRadius": "4px"
168
+ }
169
+ }
170
+ ```
171
+
172
+ ### **Network Activity**
173
+ ```json
174
+ {
175
+ "network_summary": {
176
+ "total_requests": 23,
177
+ "failed_requests": 2,
178
+ "average_response_time": 145.5
179
+ },
180
+ "failed_requests": [
181
+ {"url": "/api/data", "status": 404, "timing": 1250}
182
+ ]
183
+ }
184
+ ```
185
+
186
+ ### **Console Intelligence**
187
+ ```json
188
+ {
189
+ "console_summary": {
190
+ "error_count": 1,
191
+ "warning_count": 2
192
+ },
193
+ "errors": [
194
+ {"text": "Cannot read property 'id' of undefined", "location": "app.js:42"}
195
+ ]
196
+ }
197
+ ```
198
+
199
+ ## 📚 Documentation
200
+
201
+ **[📖 Complete User Manual](docs/USER_MANUAL.md)** - Everything you need:
202
+ - Installation and setup
203
+ - All features and examples
204
+ - CLI commands and Python API
205
+ - Troubleshooting guide
206
+
207
+ ## 🎯 Perfect for AI Development
208
+
209
+ CursorFlow is designed specifically for AI agents:
210
+ - **Complete data collection** - AI gets full context
211
+ - **Structured output** - Consistent JSON format
212
+ - **No analysis** - We collect, AI decides
213
+ - **Rapid iteration** - Fast feedback loops
214
+ - **Universal compatibility** - Works with any web app
215
+
216
+ ## Installation
217
+
218
+ ```bash
219
+ pip install cursorflow
220
+ ```
221
+
222
+ Browser dependencies install automatically on first use.
223
+
224
+ ---
225
+
226
+ **CursorFlow: The data collection engine that powers AI-driven web development.** 🚀
@@ -0,0 +1,184 @@
1
+ # CursorFlow
2
+
3
+ **Complete page intelligence for AI-driven development**
4
+
5
+ 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.
6
+
7
+ ## 🎯 What CursorFlow Does
8
+
9
+ **Data Collection, Not Analysis** - We gather structured data, AI makes the decisions.
10
+
11
+ ### **📊 Complete Page Intelligence**
12
+ Every screenshot captures everything:
13
+ - **DOM**: All elements with exact CSS properties
14
+ - **Network**: All requests, responses, and timing
15
+ - **Console**: All logs, errors, and warnings
16
+ - **Performance**: Load times, memory usage, metrics
17
+ - **Visual**: Screenshots and pixel-perfect comparisons
18
+
19
+ ### **🔄 Rapid Iteration Support**
20
+ - **Mockup comparison** with pixel-level analysis
21
+ - **Hot reload integration** for instant CSS testing
22
+ - **Persistent sessions** that survive code changes
23
+ - **Universal framework support** (React, Vue, PHP, Perl, anything)
24
+
25
+ ### **🤖 AI-First Design**
26
+ All data structured for AI consumption:
27
+ - Consistent JSON format across all features
28
+ - Element-level CSS properties for precise modifications
29
+ - Error correlation with timing data
30
+ - Performance insights with actionable metrics
31
+
32
+ ## 🚀 Quick Start
33
+
34
+ ```bash
35
+ # Install
36
+ pip install cursorflow
37
+
38
+ # Test any component - captures everything automatically
39
+ cursorflow test dashboard --base-url http://localhost:3000
40
+
41
+ # Compare mockup to implementation
42
+ cursorflow compare-mockup https://mockup.com/design --base-url http://localhost:3000
43
+ ```
44
+
45
+ ## 💻 Usage Examples
46
+
47
+ ### **Basic Testing**
48
+ ```python
49
+ from cursorflow import CursorFlow
50
+
51
+ flow = CursorFlow(base_url="http://localhost:3000")
52
+
53
+ # Every screenshot includes complete page data
54
+ results = await flow.execute_and_collect([
55
+ {"navigate": "/dashboard"},
56
+ {"screenshot": "loaded"} # Captures DOM, network, console, performance
57
+ ])
58
+
59
+ # Access structured data for AI analysis
60
+ screenshot = results['artifacts']['screenshots'][0]
61
+ elements = screenshot['dom_analysis']['elements'] # All elements + CSS
62
+ network = screenshot['network_data'] # All requests + timing
63
+ console = screenshot['console_data'] # All logs + errors
64
+ ```
65
+
66
+ ### **Mockup Comparison**
67
+ ```python
68
+ # Compare design to implementation with complete element data
69
+ results = await flow.compare_mockup_to_implementation(
70
+ mockup_url="https://mockup.com/design",
71
+ implementation_url="http://localhost:3000/dashboard"
72
+ )
73
+
74
+ # AI gets exact differences and CSS properties for every element
75
+ differences = results['layout_analysis']['element_differences']
76
+ ```
77
+
78
+ ### **CSS Iteration**
79
+ ```python
80
+ # Test CSS changes with hot reload - no page refresh needed
81
+ css_changes = [
82
+ {"name": "spacing", "css": ".container { gap: 2rem; }"},
83
+ {"name": "colors", "css": ".button { background: blue; }"}
84
+ ]
85
+
86
+ results = await flow.css_iteration_persistent(
87
+ base_actions=[{"navigate": "/page"}],
88
+ css_changes=css_changes
89
+ )
90
+ ```
91
+
92
+ ## 🔧 CLI Commands
93
+
94
+ ```bash
95
+ # Test component with complete data capture
96
+ cursorflow test component --base-url http://localhost:3000
97
+
98
+ # Compare mockup to implementation
99
+ cursorflow compare-mockup https://mockup.com/design --base-url http://localhost:3000
100
+
101
+ # Iterate on CSS improvements
102
+ cursorflow iterate-mockup https://mockup.com/design --base-url http://localhost:3000
103
+ ```
104
+
105
+ ## 🌐 Universal Framework Support
106
+
107
+ Works with any web technology:
108
+ - **Modern**: React, Vue, Angular, Next.js, Svelte
109
+ - **Traditional**: PHP, Django, Rails, Laravel
110
+ - **Legacy**: Perl, mod_perl, OpenSAS, Classic ASP
111
+ - **Any URL**: Local development, staging, production
112
+
113
+ ## 📊 What AI Gets
114
+
115
+ ### **Complete Element Data**
116
+ ```json
117
+ {
118
+ "tagName": "button",
119
+ "textContent": "Save Changes",
120
+ "boundingBox": {"x": 100, "y": 200, "width": 120, "height": 40},
121
+ "computedStyles": {
122
+ "backgroundColor": "rgb(0, 123, 255)",
123
+ "fontSize": "14px",
124
+ "padding": "8px 16px",
125
+ "borderRadius": "4px"
126
+ }
127
+ }
128
+ ```
129
+
130
+ ### **Network Activity**
131
+ ```json
132
+ {
133
+ "network_summary": {
134
+ "total_requests": 23,
135
+ "failed_requests": 2,
136
+ "average_response_time": 145.5
137
+ },
138
+ "failed_requests": [
139
+ {"url": "/api/data", "status": 404, "timing": 1250}
140
+ ]
141
+ }
142
+ ```
143
+
144
+ ### **Console Intelligence**
145
+ ```json
146
+ {
147
+ "console_summary": {
148
+ "error_count": 1,
149
+ "warning_count": 2
150
+ },
151
+ "errors": [
152
+ {"text": "Cannot read property 'id' of undefined", "location": "app.js:42"}
153
+ ]
154
+ }
155
+ ```
156
+
157
+ ## 📚 Documentation
158
+
159
+ **[📖 Complete User Manual](docs/USER_MANUAL.md)** - Everything you need:
160
+ - Installation and setup
161
+ - All features and examples
162
+ - CLI commands and Python API
163
+ - Troubleshooting guide
164
+
165
+ ## 🎯 Perfect for AI Development
166
+
167
+ CursorFlow is designed specifically for AI agents:
168
+ - **Complete data collection** - AI gets full context
169
+ - **Structured output** - Consistent JSON format
170
+ - **No analysis** - We collect, AI decides
171
+ - **Rapid iteration** - Fast feedback loops
172
+ - **Universal compatibility** - Works with any web app
173
+
174
+ ## Installation
175
+
176
+ ```bash
177
+ pip install cursorflow
178
+ ```
179
+
180
+ Browser dependencies install automatically on first use.
181
+
182
+ ---
183
+
184
+ **CursorFlow: The data collection engine that powers AI-driven web development.** 🚀