cursorflow 2.0.2__tar.gz → 2.0.4__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 (42) hide show
  1. {cursorflow-2.0.2 → cursorflow-2.0.4}/PKG-INFO +1 -1
  2. {cursorflow-2.0.2 → cursorflow-2.0.4}/cursorflow/__init__.py +1 -1
  3. {cursorflow-2.0.2 → cursorflow-2.0.4}/cursorflow/cli.py +11 -5
  4. {cursorflow-2.0.2 → cursorflow-2.0.4}/cursorflow/install_cursorflow_rules.py +66 -14
  5. {cursorflow-2.0.2 → cursorflow-2.0.4}/examples/comprehensive_screenshot_example.py +7 -2
  6. {cursorflow-2.0.2 → cursorflow-2.0.4}/examples/mockup_comparison_example.py +21 -6
  7. {cursorflow-2.0.2 → cursorflow-2.0.4}/pyproject.toml +1 -1
  8. {cursorflow-2.0.2 → cursorflow-2.0.4}/LICENSE +0 -0
  9. {cursorflow-2.0.2 → cursorflow-2.0.4}/MANIFEST.in +0 -0
  10. {cursorflow-2.0.2 → cursorflow-2.0.4}/README.md +0 -0
  11. {cursorflow-2.0.2 → cursorflow-2.0.4}/cursorflow/auto_updater.py +0 -0
  12. {cursorflow-2.0.2 → cursorflow-2.0.4}/cursorflow/core/agent.py +0 -0
  13. {cursorflow-2.0.2 → cursorflow-2.0.4}/cursorflow/core/auth_handler.py +0 -0
  14. {cursorflow-2.0.2 → cursorflow-2.0.4}/cursorflow/core/browser_controller.py +0 -0
  15. {cursorflow-2.0.2 → cursorflow-2.0.4}/cursorflow/core/browser_engine.py +0 -0
  16. {cursorflow-2.0.2 → cursorflow-2.0.4}/cursorflow/core/css_iterator.py +0 -0
  17. {cursorflow-2.0.2 → cursorflow-2.0.4}/cursorflow/core/cursor_integration.py +0 -0
  18. {cursorflow-2.0.2 → cursorflow-2.0.4}/cursorflow/core/cursorflow.py +0 -0
  19. {cursorflow-2.0.2 → cursorflow-2.0.4}/cursorflow/core/error_context_collector.py +0 -0
  20. {cursorflow-2.0.2 → cursorflow-2.0.4}/cursorflow/core/error_correlator.py +0 -0
  21. {cursorflow-2.0.2 → cursorflow-2.0.4}/cursorflow/core/event_correlator.py +0 -0
  22. {cursorflow-2.0.2 → cursorflow-2.0.4}/cursorflow/core/file_change_monitor.py +0 -0
  23. {cursorflow-2.0.2 → cursorflow-2.0.4}/cursorflow/core/hmr_detector.py +0 -0
  24. {cursorflow-2.0.2 → cursorflow-2.0.4}/cursorflow/core/log_collector.py +0 -0
  25. {cursorflow-2.0.2 → cursorflow-2.0.4}/cursorflow/core/log_monitor.py +0 -0
  26. {cursorflow-2.0.2 → cursorflow-2.0.4}/cursorflow/core/mockup_comparator.py +0 -0
  27. {cursorflow-2.0.2 → cursorflow-2.0.4}/cursorflow/core/persistent_session.py +0 -0
  28. {cursorflow-2.0.2 → cursorflow-2.0.4}/cursorflow/core/report_generator.py +0 -0
  29. {cursorflow-2.0.2 → cursorflow-2.0.4}/cursorflow/core/trace_manager.py +0 -0
  30. {cursorflow-2.0.2 → cursorflow-2.0.4}/cursorflow/log_sources/local_file.py +0 -0
  31. {cursorflow-2.0.2 → cursorflow-2.0.4}/cursorflow/log_sources/ssh_remote.py +0 -0
  32. {cursorflow-2.0.2 → cursorflow-2.0.4}/cursorflow/rules/__init__.py +0 -0
  33. {cursorflow-2.0.2 → cursorflow-2.0.4}/cursorflow/rules/cursorflow-installation.mdc +0 -0
  34. {cursorflow-2.0.2 → cursorflow-2.0.4}/cursorflow/rules/cursorflow-usage.mdc +0 -0
  35. {cursorflow-2.0.2 → cursorflow-2.0.4}/cursorflow/updater.py +0 -0
  36. {cursorflow-2.0.2 → cursorflow-2.0.4}/cursorflow.egg-info/SOURCES.txt +0 -0
  37. {cursorflow-2.0.2 → cursorflow-2.0.4}/docs/USER_MANUAL.md +0 -0
  38. {cursorflow-2.0.2 → cursorflow-2.0.4}/examples/opensas_example.py +0 -0
  39. {cursorflow-2.0.2 → cursorflow-2.0.4}/examples/react_example.py +0 -0
  40. {cursorflow-2.0.2 → cursorflow-2.0.4}/examples/v2_comprehensive_demo.py +0 -0
  41. {cursorflow-2.0.2 → cursorflow-2.0.4}/setup.cfg +0 -0
  42. {cursorflow-2.0.2 → cursorflow-2.0.4}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cursorflow
3
- Version: 2.0.2
3
+ Version: 2.0.4
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
@@ -49,7 +49,7 @@ def _get_version():
49
49
  pass
50
50
 
51
51
  # Fallback version - should match pyproject.toml
52
- return "2.0.2"
52
+ return "2.0.4"
53
53
 
54
54
  __version__ = _get_version()
55
55
  __author__ = "GeekWarrior Development"
@@ -128,10 +128,15 @@ def test(base_url, path, actions, output, logs, config, verbose, headless, timeo
128
128
 
129
129
  # Save results to file for Cursor analysis
130
130
  if not output:
131
- # Auto-generate meaningful filename
131
+ # Auto-generate meaningful filename in .cursorflow/artifacts/
132
132
  session_id = results.get('session_id', 'unknown')
133
133
  path_part = path.replace('/', '_') if path else 'root'
134
- output = f"cursorflow_{path_part}_{session_id}.json"
134
+
135
+ # Ensure .cursorflow/artifacts directory exists
136
+ artifacts_dir = Path('.cursorflow/artifacts')
137
+ artifacts_dir.mkdir(parents=True, exist_ok=True)
138
+
139
+ output = artifacts_dir / f"cursorflow_{path_part}_{session_id}.json"
135
140
 
136
141
  with open(output, 'w') as f:
137
142
  json.dump(results, f, indent=2, default=str)
@@ -413,8 +418,9 @@ async def _run_auto_tests(framework: str, base_url: str, config: Dict):
413
418
 
414
419
  @main.command()
415
420
  @click.argument('project_path', default='.')
416
- @click.option('--framework', '-f')
417
- def install_rules(project_path, framework):
421
+ @click.option('--framework', '-f')
422
+ @click.option('--force', is_flag=True, help='Force update existing configuration')
423
+ def install_rules(project_path, framework, force):
418
424
  """Install CursorFlow rules and configuration in a project"""
419
425
 
420
426
  console.print("🚀 Installing CursorFlow rules and configuration...")
@@ -422,7 +428,7 @@ def install_rules(project_path, framework):
422
428
  try:
423
429
  # Import and run the installation
424
430
  from .install_cursorflow_rules import install_cursorflow_rules
425
- success = install_cursorflow_rules(project_path)
431
+ success = install_cursorflow_rules(project_path, force=force)
426
432
 
427
433
  if success:
428
434
  console.print("[green]✅ CursorFlow rules installed successfully![/green]")
@@ -14,7 +14,7 @@ from pathlib import Path
14
14
  import argparse
15
15
 
16
16
 
17
- def install_cursorflow_rules(project_dir: str = "."):
17
+ def install_cursorflow_rules(project_dir: str = ".", force: bool = False):
18
18
  """Install CursorFlow rules and configuration in user's project"""
19
19
 
20
20
  project_path = Path(project_dir).resolve()
@@ -43,7 +43,7 @@ def install_cursorflow_rules(project_dir: str = "."):
43
43
  print(f"❌ Could not find CursorFlow rules directory at: {rules_source_dir}")
44
44
  return False
45
45
 
46
- # Copy usage rules (not development rules)
46
+ # Copy usage rules (always overwrite to ensure latest version)
47
47
  usage_rules = [
48
48
  "cursorflow-usage.mdc",
49
49
  "cursorflow-installation.mdc"
@@ -55,20 +55,24 @@ def install_cursorflow_rules(project_dir: str = "."):
55
55
  target_file = rules_dir / rule_file
56
56
 
57
57
  if source_file.exists():
58
+ # Check if target already exists before overwriting
59
+ target_exists = target_file.exists()
60
+ # Always overwrite to ensure latest rules on upgrade
58
61
  shutil.copy2(source_file, target_file)
59
62
  copied_files.append(rule_file)
60
- print(f" Installed: {rule_file}")
63
+ action = "Updated" if target_exists else "Installed"
64
+ print(f"✅ {action}: {rule_file}")
61
65
  else:
62
66
  print(f"⚠️ Rule file not found: {rule_file}")
63
67
 
64
68
  # Create project-specific .gitignore entries
65
69
  create_gitignore_entries(project_path)
66
70
 
67
- # Create CursorFlow configuration template
68
- create_config_template(project_path)
71
+ # Create or update CursorFlow configuration template
72
+ create_config_template(project_path, force=force)
69
73
 
70
74
  print(f"\n🎉 CursorFlow rules installation complete!")
71
- print(f"📋 Installed {len(copied_files)} rule files:")
75
+ print(f"📋 Processed {len(copied_files)} rule files:")
72
76
  for file in copied_files:
73
77
  print(f" - {file}")
74
78
 
@@ -113,16 +117,62 @@ cursorflow_session_*.json
113
117
  print("ℹ️ CursorFlow entries already in .gitignore")
114
118
 
115
119
 
116
- def create_config_template(project_path: Path):
117
- """Create CursorFlow configuration template"""
120
+ def create_config_template(project_path: Path, force: bool = False):
121
+ """Create or update CursorFlow configuration template"""
118
122
 
119
123
  config_path = project_path / "cursorflow-config.json"
120
124
 
125
+ # Get current version
126
+ try:
127
+ import cursorflow
128
+ current_version = getattr(cursorflow, '__version__', '2.0.4')
129
+ except ImportError:
130
+ current_version = '2.0.4'
131
+
121
132
  if config_path.exists():
122
- print("ℹ️ cursorflow-config.json already exists")
123
- return
133
+ if not force:
134
+ print("ℹ️ cursorflow-config.json already exists (use --force to recreate)")
135
+ # Smart update: only update version and add missing fields
136
+ try:
137
+ with open(config_path) as f:
138
+ existing_config = json.load(f)
139
+
140
+ updated = False
141
+
142
+ # Update version if outdated
143
+ if existing_config.get("_cursorflow_version") != current_version:
144
+ existing_config["_cursorflow_version"] = current_version
145
+ updated = True
146
+
147
+ # Add missing browser section if it doesn't exist (new in v2.0)
148
+ if "browser" not in existing_config:
149
+ existing_config["browser"] = {
150
+ "headless": True,
151
+ "debug_mode": False
152
+ }
153
+ updated = True
154
+ print("✅ Added new 'browser' configuration section")
155
+
156
+ # Add missing auth session_storage if it doesn't exist
157
+ if "auth" in existing_config and "session_storage" not in existing_config["auth"]:
158
+ existing_config["auth"]["session_storage"] = ".cursorflow/sessions/"
159
+ updated = True
160
+ print("✅ Added 'session_storage' to auth configuration")
161
+
162
+ if updated:
163
+ with open(config_path, 'w') as f:
164
+ json.dump(existing_config, f, indent=2)
165
+ print(f"✅ Updated config to version {current_version} (preserved user settings)")
166
+ else:
167
+ print(f"ℹ️ Configuration is current (version {current_version})")
168
+
169
+ except Exception as e:
170
+ print(f"⚠️ Could not update config: {e}")
171
+ return
172
+ else:
173
+ print("🔄 Force mode: Recreating configuration (user settings will be lost)")
124
174
 
125
- # Auto-detect project type for better defaults
175
+ # Create new config or force recreate
126
176
  project_type = detect_project_type(project_path)
127
177
 
128
178
  config_template = {
@@ -147,8 +197,10 @@ def create_config_template(project_path: Path):
147
197
  with open(config_path, "w") as f:
148
198
  json.dump(config_template, f, indent=2)
149
199
 
150
- print(f" Created configuration template: cursorflow-config.json")
200
+ action = "Recreated" if force else "Created"
201
+ print(f"✅ {action} configuration template: cursorflow-config.json")
151
202
  print(f" Detected project type: {project_type}")
203
+ print(f" CursorFlow version: {current_version}")
152
204
 
153
205
 
154
206
  def detect_project_type(project_path: Path) -> str:
@@ -250,9 +302,9 @@ def setup_update_checking(project_path: Path):
250
302
  # Create initial version tracking
251
303
  try:
252
304
  import cursorflow
253
- current_version = getattr(cursorflow, '__version__', '2.0.2')
305
+ current_version = getattr(cursorflow, '__version__', '2.0.4')
254
306
  except ImportError:
255
- current_version = '2.0.2'
307
+ current_version = '2.0.4'
256
308
 
257
309
  version_info = {
258
310
  "installed_version": current_version,
@@ -103,10 +103,15 @@ async def demonstrate_comprehensive_screenshot():
103
103
  print(f" Recent Errors: {console_summary.get('has_recent_errors', False)}")
104
104
 
105
105
  # Save detailed analysis for inspection
106
- with open('comprehensive_screenshot_analysis.json', 'w') as f:
106
+ from pathlib import Path
107
+ artifacts_dir = Path('.cursorflow/artifacts')
108
+ artifacts_dir.mkdir(parents=True, exist_ok=True)
109
+
110
+ analysis_file = artifacts_dir / 'comprehensive_screenshot_analysis.json'
111
+ with open(analysis_file, 'w') as f:
107
112
  json.dump(results, f, indent=2, default=str)
108
113
 
109
- print(f"\n💾 Complete analysis saved to: comprehensive_screenshot_analysis.json")
114
+ print(f"\n💾 Complete analysis saved to: {analysis_file}")
110
115
  print(f"📁 All artifacts available in: .cursorflow/artifacts/")
111
116
 
112
117
  return results
@@ -71,10 +71,15 @@ async def basic_mockup_comparison():
71
71
  print(f" {i+1}. {rec.get('description', 'No description')}")
72
72
 
73
73
  # Save results for analysis
74
- with open('basic_mockup_comparison_results.json', 'w') as f:
74
+ from pathlib import Path
75
+ artifacts_dir = Path('.cursorflow/artifacts')
76
+ artifacts_dir.mkdir(parents=True, exist_ok=True)
77
+
78
+ results_file = artifacts_dir / 'basic_mockup_comparison_results.json'
79
+ with open(results_file, 'w') as f:
75
80
  json.dump(results, f, indent=2, default=str)
76
81
 
77
- print(f"\n💾 Full results saved to: basic_mockup_comparison_results.json")
82
+ print(f"\n💾 Full results saved to: {results_file}")
78
83
  print(f"📁 Visual diffs available in: .cursorflow/artifacts/")
79
84
 
80
85
  return results
@@ -187,10 +192,15 @@ async def iterative_mockup_matching():
187
192
  print()
188
193
 
189
194
  # Save results for analysis
190
- with open('iterative_mockup_matching_results.json', 'w') as f:
195
+ from pathlib import Path
196
+ artifacts_dir = Path('.cursorflow/artifacts')
197
+ artifacts_dir.mkdir(parents=True, exist_ok=True)
198
+
199
+ results_file = artifacts_dir / 'iterative_mockup_matching_results.json'
200
+ with open(results_file, 'w') as f:
191
201
  json.dump(results, f, indent=2, default=str)
192
202
 
193
- print(f"💾 Full results saved to: iterative_mockup_matching_results.json")
203
+ print(f"💾 Full results saved to: {results_file}")
194
204
  print(f"📁 Iteration progress available in: .cursorflow/artifacts/")
195
205
 
196
206
  return results
@@ -253,10 +263,15 @@ async def responsive_mockup_comparison():
253
263
  f"({worst_viewport.get('visual_diff', {}).get('similarity_score', 0)}%)")
254
264
 
255
265
  # Save results
256
- with open('responsive_mockup_comparison_results.json', 'w') as f:
266
+ from pathlib import Path
267
+ artifacts_dir = Path('.cursorflow/artifacts')
268
+ artifacts_dir.mkdir(parents=True, exist_ok=True)
269
+
270
+ results_file = artifacts_dir / 'responsive_mockup_comparison_results.json'
271
+ with open(results_file, 'w') as f:
257
272
  json.dump(results, f, indent=2, default=str)
258
273
 
259
- print(f"\n💾 Full results saved to: responsive_mockup_comparison_results.json")
274
+ print(f"\n💾 Full results saved to: {results_file}")
260
275
 
261
276
  return results
262
277
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "cursorflow"
7
- version = "2.0.2"
7
+ version = "2.0.4"
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
File without changes