cursorflow 2.6.2__py3-none-any.whl → 2.6.3__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/cli.py CHANGED
@@ -15,6 +15,7 @@ from typing import Dict
15
15
  from rich.console import Console
16
16
  from rich.table import Table
17
17
  from rich.progress import Progress, SpinnerColumn, TextColumn
18
+ from rich.markup import escape
18
19
 
19
20
  from .core.agent import TestAgent
20
21
  from . import __version__
@@ -185,10 +186,10 @@ def test(base_url, path, actions, output, logs, config, verbose, headless, timeo
185
186
  test_actions = json.loads(actions)
186
187
  console.print(f"📋 Using inline actions")
187
188
  except json.JSONDecodeError as e:
188
- console.print(f"[red]❌ Invalid JSON in actions: {e}[/red]")
189
+ console.print(f"[red]❌ Invalid JSON in actions: {escape(str(e))}[/red]")
189
190
  return
190
191
  except Exception as e:
191
- console.print(f"[red]❌ Failed to load actions: {e}[/red]")
192
+ console.print(f"[red]❌ Failed to load actions: {escape(str(e))}[/red]")
192
193
  return
193
194
  elif path:
194
195
  # Simple path navigation with optional wait conditions
@@ -236,7 +237,7 @@ def test(base_url, path, actions, output, logs, config, verbose, headless, timeo
236
237
  **agent_config
237
238
  )
238
239
  except Exception as e:
239
- console.print(f"[red]Error initializing CursorFlow: {e}[/red]")
240
+ console.print(f"[red]Error initializing CursorFlow: {escape(str(e))}[/red]")
240
241
  return
241
242
 
242
243
  # Execute test actions
@@ -339,7 +340,7 @@ def test(base_url, path, actions, output, logs, config, verbose, headless, timeo
339
340
  console.print(f"💡 View manually: playwright show-trace {trace_path}")
340
341
 
341
342
  except Exception as e:
342
- console.print(f"[red]❌ Test failed: {e}[/red]")
343
+ console.print(f"[red]❌ Test failed: {escape(str(e))}[/red]")
343
344
  if verbose:
344
345
  import traceback
345
346
  console.print(traceback.format_exc())
@@ -398,7 +399,7 @@ def compare_mockup(mockup_url, base_url, mockup_actions, implementation_actions,
398
399
  comparison_config["viewports"] = viewports_parsed
399
400
 
400
401
  except Exception as e:
401
- console.print(f"[red]Error parsing input parameters: {e}[/red]")
402
+ console.print(f"[red]Error parsing input parameters: {escape(str(e))}[/red]")
402
403
  return
403
404
 
404
405
  # Initialize CursorFlow
@@ -411,7 +412,7 @@ def compare_mockup(mockup_url, base_url, mockup_actions, implementation_actions,
411
412
  browser_config={'headless': True}
412
413
  )
413
414
  except Exception as e:
414
- console.print(f"[red]Error initializing CursorFlow: {e}[/red]")
415
+ console.print(f"[red]Error initializing CursorFlow: {escape(str(e))}[/red]")
415
416
  return
416
417
 
417
418
  # Execute mockup comparison
@@ -425,7 +426,7 @@ def compare_mockup(mockup_url, base_url, mockup_actions, implementation_actions,
425
426
  ))
426
427
 
427
428
  if "error" in results:
428
- console.print(f"[red]❌ Comparison failed: {results['error']}[/red]")
429
+ console.print(f"[red]❌ Comparison failed: {escape(str(results['error']))}[/red]")
429
430
  return
430
431
 
431
432
  # Display results summary (pure metrics only)
@@ -453,7 +454,7 @@ def compare_mockup(mockup_url, base_url, mockup_actions, implementation_actions,
453
454
  console.print(f"📁 Visual diffs stored in: [cyan].cursorflow/artifacts/[/cyan]")
454
455
 
455
456
  except Exception as e:
456
- console.print(f"[red]❌ Comparison failed: {e}[/red]")
457
+ console.print(f"[red]❌ Comparison failed: {escape(str(e))}[/red]")
457
458
  if verbose:
458
459
  import traceback
459
460
  console.print(traceback.format_exc())
@@ -500,7 +501,7 @@ def iterate_mockup(mockup_url, base_url, css_improvements, base_actions, diff_th
500
501
  comparison_config = {"diff_threshold": diff_threshold}
501
502
 
502
503
  except Exception as e:
503
- console.print(f"[red]Error parsing input parameters: {e}[/red]")
504
+ console.print(f"[red]Error parsing input parameters: {escape(str(e))}[/red]")
504
505
  return
505
506
 
506
507
  # Initialize CursorFlow
@@ -512,7 +513,7 @@ def iterate_mockup(mockup_url, base_url, css_improvements, base_actions, diff_th
512
513
  browser_config={'headless': True}
513
514
  )
514
515
  except Exception as e:
515
- console.print(f"[red]Error initializing CursorFlow: {e}[/red]")
516
+ console.print(f"[red]Error initializing CursorFlow: {escape(str(e))}[/red]")
516
517
  return
517
518
 
518
519
  # Execute iterative mockup matching
@@ -526,7 +527,7 @@ def iterate_mockup(mockup_url, base_url, css_improvements, base_actions, diff_th
526
527
  ))
527
528
 
528
529
  if "error" in results:
529
- console.print(f"[red]❌ Iteration failed: {results['error']}[/red]")
530
+ console.print(f"[red]❌ Iteration failed: {escape(str(results['error']))}[/red]")
530
531
  return
531
532
 
532
533
  # Display results summary
@@ -563,7 +564,7 @@ def iterate_mockup(mockup_url, base_url, css_improvements, base_actions, diff_th
563
564
  console.print(f"📁 Iteration progress stored in: [cyan].cursorflow/artifacts/[/cyan]")
564
565
 
565
566
  except Exception as e:
566
- console.print(f"[red]❌ Iteration failed: {e}[/red]")
567
+ console.print(f"[red]❌ Iteration failed: {escape(str(e))}[/red]")
567
568
  if verbose:
568
569
  import traceback
569
570
  console.print(traceback.format_exc())
@@ -620,7 +621,7 @@ async def _run_auto_tests(framework: str, base_url: str, config: Dict):
620
621
  display_smoke_test_summary(results)
621
622
 
622
623
  except Exception as e:
623
- console.print(f"[red]Auto-test failed: {e}[/red]")
624
+ console.print(f"[red]Auto-test failed: {escape(str(e))}[/red]")
624
625
 
625
626
  @main.command()
626
627
  @click.argument('project_path', default='.')
@@ -648,7 +649,7 @@ def install_rules(project_path, framework, force, yes):
648
649
  console.print("[red]❌ Installation failed[/red]")
649
650
 
650
651
  except Exception as e:
651
- console.print(f"[red]Installation error: {e}[/red]")
652
+ console.print(f"[red]Installation error: {escape(str(e))}[/red]")
652
653
 
653
654
  @main.command()
654
655
  @click.option('--force', is_flag=True, help='Force update even if no updates available')
@@ -670,7 +671,7 @@ def update(force, project_dir):
670
671
  console.print("[red]❌ Update failed[/red]")
671
672
 
672
673
  except Exception as e:
673
- console.print(f"[red]Update error: {e}[/red]")
674
+ console.print(f"[red]Update error: {escape(str(e))}[/red]")
674
675
 
675
676
  @main.command()
676
677
  @click.option('--project-dir', default='.', help='Project directory')
@@ -684,7 +685,7 @@ def check_updates(project_dir):
684
685
  result = asyncio.run(check_updates(project_dir))
685
686
 
686
687
  if "error" in result:
687
- console.print(f"[red]Error checking updates: {result['error']}[/red]")
688
+ console.print(f"[red]Error checking updates: {escape(str(result['error']))}[/red]")
688
689
  return
689
690
 
690
691
  # Display update information
@@ -723,7 +724,7 @@ def check_updates(project_dir):
723
724
  console.print("\n💡 Run [bold]cursorflow update[/bold] to install updates")
724
725
 
725
726
  except Exception as e:
726
- console.print(f"[red]Error: {e}[/red]")
727
+ console.print(f"[red]Error: {escape(str(e))}[/red]")
727
728
 
728
729
  @main.command()
729
730
  @click.option('--project-dir', default='.', help='Project directory')
@@ -744,7 +745,7 @@ def install_deps(project_dir):
744
745
  console.print("[red]❌ Dependency installation failed[/red]")
745
746
 
746
747
  except Exception as e:
747
- console.print(f"[red]Error: {e}[/red]")
748
+ console.print(f"[red]Error: {escape(str(e))}[/red]")
748
749
 
749
750
  @main.command()
750
751
  @click.argument('subcommand', required=False)
@@ -959,7 +960,7 @@ def inspect(base_url, path, selector, verbose):
959
960
  console.print(f"\n📸 Screenshot saved: [cyan]{screenshot_path}[/cyan]")
960
961
 
961
962
  except Exception as e:
962
- console.print(f"[red]❌ Inspection failed: {e}[/red]")
963
+ console.print(f"[red]❌ Inspection failed: {escape(str(e))}[/red]")
963
964
  import traceback
964
965
  console.print(traceback.format_exc())
965
966
 
@@ -1086,7 +1087,7 @@ def measure(base_url, path, selector, verbose):
1086
1087
  console.print("✅ Measurement complete")
1087
1088
 
1088
1089
  except Exception as e:
1089
- console.print(f"[red]❌ Measurement failed: {e}[/red]")
1090
+ console.print(f"[red]❌ Measurement failed: {escape(str(e))}[/red]")
1090
1091
  import traceback
1091
1092
  console.print(traceback.format_exc())
1092
1093
 
@@ -1137,7 +1138,7 @@ def count(base_url, path, selector):
1137
1138
  console.print(f"💡 Total elements on page: {len(elements)}")
1138
1139
 
1139
1140
  except Exception as e:
1140
- console.print(f"[red]❌ Count failed: {e}[/red]")
1141
+ console.print(f"[red]❌ Count failed: {escape(str(e))}[/red]")
1141
1142
  import traceback
1142
1143
  console.print(traceback.format_exc())
1143
1144
 
@@ -1174,7 +1175,7 @@ def rerun(click, hover):
1174
1175
  console.print("✅ Rerun completed")
1175
1176
 
1176
1177
  except Exception as e:
1177
- console.print(f"[red]❌ Rerun failed: {e}[/red]")
1178
+ console.print(f"[red]❌ Rerun failed: {escape(str(e))}[/red]")
1178
1179
 
1179
1180
  @main.command()
1180
1181
  @click.option('--session', '-s', required=True, help='Session ID to view timeline for')
@@ -1227,7 +1228,7 @@ def timeline(session):
1227
1228
  console.print(f"\n... and {len(timeline) - 50} more events")
1228
1229
 
1229
1230
  except Exception as e:
1230
- console.print(f"[red]❌ Failed to load timeline: {e}[/red]")
1231
+ console.print(f"[red]❌ Failed to load timeline: {escape(str(e))}[/red]")
1231
1232
 
1232
1233
  @main.command()
1233
1234
  @click.option('--artifacts', is_flag=True, help='Clean all artifacts (screenshots, traces)')
@@ -1337,7 +1338,7 @@ def cleanup(artifacts, sessions, old_only, clean_all, dry_run, yes):
1337
1338
  item_path.unlink()
1338
1339
  deleted_count += 1
1339
1340
  except Exception as e:
1340
- console.print(f"[red]⚠️ Failed to delete {item_path}: {e}[/red]")
1341
+ console.print(f"[red]⚠️ Failed to delete {item_path}: {escape(str(e))}[/red]")
1341
1342
 
1342
1343
  console.print(f"\n✅ Cleanup complete!")
1343
1344
  console.print(f" • Deleted {deleted_count}/{len(items_to_delete)} items")
@@ -1418,7 +1419,7 @@ def _display_test_results(results: Dict, test_description: str, show_console: bo
1418
1419
  if errors:
1419
1420
  console.print(f"\n[red]❌ Console Errors ({len(errors)}):[/red]")
1420
1421
  for error in errors[:5]: # Show first 5
1421
- console.print(f" [red]{error.get('text', 'Unknown error')}[/red]")
1422
+ console.print(f" [red]{escape(str(error.get('text', 'Unknown error')))}[/red]")
1422
1423
 
1423
1424
  if warnings:
1424
1425
  console.print(f"\n[yellow]⚠️ Console Warnings ({len(warnings)}):[/yellow]")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cursorflow
3
- Version: 2.6.2
3
+ Version: 2.6.3
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
@@ -1,7 +1,7 @@
1
1
  cursorflow/__init__.py,sha256=2V9xzG2tYxVWOTmSw2v9Jdbr7lSrMi_y2SMUMuNZdvw,2990
2
2
  cursorflow/auto_init.py,sha256=dXQaXXiXe4wkUP-jd8fcJ5fYVt7ASdTb47b7SzXymOM,6122
3
3
  cursorflow/auto_updater.py,sha256=oQ12TIMZ6Cm3HF-x9iRWFtvOLkRh-JWPqitS69-4roE,7851
4
- cursorflow/cli.py,sha256=ySz4bmn-vpLzS4rDBefGON93oTBTqR2ZopLfXZ5nVno,65478
4
+ cursorflow/cli.py,sha256=-gzdhMgkLxhzeCqiQaPNCgUN8jC1g8MYV4YpQmC8hVM,65834
5
5
  cursorflow/install_cursorflow_rules.py,sha256=DsZ0680y9JMuTKFXjdgYtOKIEAjBMsdwL8LmA9WEb5A,11864
6
6
  cursorflow/post_install.py,sha256=WieBiKWG0qBAQpF8iMVWUyb9Fr2Xky9qECTMPrlAbpE,2678
7
7
  cursorflow/updater.py,sha256=SroSQHQi5cYyzcOK_bf-WzmQmE7yeOs8qo3r__j-Z6E,19583
@@ -31,9 +31,9 @@ cursorflow/log_sources/ssh_remote.py,sha256=_Kwh0bhRpKgq-0c98oaX2hN6h9cT-wCHlqY5
31
31
  cursorflow/rules/__init__.py,sha256=gPcA-IkhXj03sl7cvZV0wwo7CtEkcyuKs4y0F5oQbqE,458
32
32
  cursorflow/rules/cursorflow-installation.mdc,sha256=D55pzzDPAVVbE3gAtKPUGoT-2fvB-FI2l6yrTdzUIEo,10208
33
33
  cursorflow/rules/cursorflow-usage.mdc,sha256=W56Qydfb4jqSBTrki7cNyFPfOe_b89mzniRtKSrMlz4,24138
34
- cursorflow-2.6.2.dist-info/licenses/LICENSE,sha256=e4QbjAsj3bW-xgQOvQelr8sGLYDoqc48k6cKgCr_pBU,1080
35
- cursorflow-2.6.2.dist-info/METADATA,sha256=wT7QRz67l6T69kWE8kFRlGbane6AgmEp1J3mb-56C5g,15011
36
- cursorflow-2.6.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
37
- cursorflow-2.6.2.dist-info/entry_points.txt,sha256=-Ed_n4Uff7wClEtWS-Py6xmQabecB9f0QAOjX0w7ljA,51
38
- cursorflow-2.6.2.dist-info/top_level.txt,sha256=t1UZwRyZP4u-ng2CEcNHmk_ZT4ibQxoihB2IjTF7ovc,11
39
- cursorflow-2.6.2.dist-info/RECORD,,
34
+ cursorflow-2.6.3.dist-info/licenses/LICENSE,sha256=e4QbjAsj3bW-xgQOvQelr8sGLYDoqc48k6cKgCr_pBU,1080
35
+ cursorflow-2.6.3.dist-info/METADATA,sha256=NFnew-OVbuPvE-0Bmt5TG0CDgNWdaw-76D8HkeDoet8,15011
36
+ cursorflow-2.6.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
37
+ cursorflow-2.6.3.dist-info/entry_points.txt,sha256=-Ed_n4Uff7wClEtWS-Py6xmQabecB9f0QAOjX0w7ljA,51
38
+ cursorflow-2.6.3.dist-info/top_level.txt,sha256=t1UZwRyZP4u-ng2CEcNHmk_ZT4ibQxoihB2IjTF7ovc,11
39
+ cursorflow-2.6.3.dist-info/RECORD,,