cursorflow 2.0.2__py3-none-any.whl → 2.0.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/__init__.py CHANGED
@@ -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.3"
53
53
 
54
54
  __version__ = _get_version()
55
55
  __author__ = "GeekWarrior Development"
cursorflow/cli.py CHANGED
@@ -413,8 +413,9 @@ async def _run_auto_tests(framework: str, base_url: str, config: Dict):
413
413
 
414
414
  @main.command()
415
415
  @click.argument('project_path', default='.')
416
- @click.option('--framework', '-f')
417
- def install_rules(project_path, framework):
416
+ @click.option('--framework', '-f')
417
+ @click.option('--force', is_flag=True, help='Force update existing configuration')
418
+ def install_rules(project_path, framework, force):
418
419
  """Install CursorFlow rules and configuration in a project"""
419
420
 
420
421
  console.print("🚀 Installing CursorFlow rules and configuration...")
@@ -422,7 +423,7 @@ def install_rules(project_path, framework):
422
423
  try:
423
424
  # Import and run the installation
424
425
  from .install_cursorflow_rules import install_cursorflow_rules
425
- success = install_cursorflow_rules(project_path)
426
+ success = install_cursorflow_rules(project_path, force=force)
426
427
 
427
428
  if success:
428
429
  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.3')
129
+ except ImportError:
130
+ current_version = '2.0.3'
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.3')
254
306
  except ImportError:
255
- current_version = '2.0.2'
307
+ current_version = '2.0.3'
256
308
 
257
309
  version_info = {
258
310
  "installed_version": current_version,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cursorflow
3
- Version: 2.0.2
3
+ Version: 2.0.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
- cursorflow/__init__.py,sha256=bv4BLcMMZMXLVS_HVH_-dqqvFqKUBBnAbm1vI5fOqj4,2476
1
+ cursorflow/__init__.py,sha256=tYDnTTjHpr-8tfYyS4Ut6d96yy8pRan0qyyvF0ddnFc,2476
2
2
  cursorflow/auto_updater.py,sha256=oQ12TIMZ6Cm3HF-x9iRWFtvOLkRh-JWPqitS69-4roE,7851
3
- cursorflow/cli.py,sha256=JRznfNAaXuthmCVwQX7yvX8FtAFrZYwemUA7BfvfFOo,25036
4
- cursorflow/install_cursorflow_rules.py,sha256=awbyrZ_MWUe-NNC9rWKCx-OXSbCbDoMXM7A2C8RE6uk,9206
3
+ cursorflow/cli.py,sha256=rqeDJTevUoTZYmZ5aGJBjxacDEsLKjeHbHuqP-P1q0I,25141
4
+ cursorflow/install_cursorflow_rules.py,sha256=v7VZm9zdLSWW_JwNKMY9oKQabpp7sLo0aM6s4vlWgVs,11792
5
5
  cursorflow/updater.py,sha256=rAST7STjw-SgKxn_jsQJWOoyEMia-MQVxpKMwzPRnOA,19573
6
6
  cursorflow/core/agent.py,sha256=f3lecgEzDRDdGTVccAtorpLGfNJJ49bbsQAmgr0vNGg,10136
7
7
  cursorflow/core/auth_handler.py,sha256=oRafO6ZdxoHryBIvHsrNV8TECed4GXpJsdEiH0KdPPk,17149
@@ -26,9 +26,9 @@ cursorflow/log_sources/ssh_remote.py,sha256=zSnX8mpa5G86UDWEm3_FqYwo1PjBW67C1LPk
26
26
  cursorflow/rules/__init__.py,sha256=gPcA-IkhXj03sl7cvZV0wwo7CtEkcyuKs4y0F5oQbqE,458
27
27
  cursorflow/rules/cursorflow-installation.mdc,sha256=PZN4hHpy2_g3EzD8BxZYhXF9A6YCvtMGaD3uOA7UVSs,9511
28
28
  cursorflow/rules/cursorflow-usage.mdc,sha256=SAsJRmml8W1zE_jArZnRtygO9RmggjEzxGA6hxBJ-H4,18924
29
- cursorflow-2.0.2.dist-info/licenses/LICENSE,sha256=e4QbjAsj3bW-xgQOvQelr8sGLYDoqc48k6cKgCr_pBU,1080
30
- cursorflow-2.0.2.dist-info/METADATA,sha256=1E_EJroM0zhjPXUUn1NolUltEH7gvgTuIQUXg1nixKA,10656
31
- cursorflow-2.0.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
32
- cursorflow-2.0.2.dist-info/entry_points.txt,sha256=-Ed_n4Uff7wClEtWS-Py6xmQabecB9f0QAOjX0w7ljA,51
33
- cursorflow-2.0.2.dist-info/top_level.txt,sha256=t1UZwRyZP4u-ng2CEcNHmk_ZT4ibQxoihB2IjTF7ovc,11
34
- cursorflow-2.0.2.dist-info/RECORD,,
29
+ cursorflow-2.0.3.dist-info/licenses/LICENSE,sha256=e4QbjAsj3bW-xgQOvQelr8sGLYDoqc48k6cKgCr_pBU,1080
30
+ cursorflow-2.0.3.dist-info/METADATA,sha256=JzdLlaqvX-uAQ6-tGjHAQU2c6E6eVUoEma_JY6d44Ns,10656
31
+ cursorflow-2.0.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
32
+ cursorflow-2.0.3.dist-info/entry_points.txt,sha256=-Ed_n4Uff7wClEtWS-Py6xmQabecB9f0QAOjX0w7ljA,51
33
+ cursorflow-2.0.3.dist-info/top_level.txt,sha256=t1UZwRyZP4u-ng2CEcNHmk_ZT4ibQxoihB2IjTF7ovc,11
34
+ cursorflow-2.0.3.dist-info/RECORD,,