cursorflow 2.0.1__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 +2 -2
- cursorflow/cli.py +4 -3
- cursorflow/install_cursorflow_rules.py +73 -15
- cursorflow/updater.py +21 -2
- {cursorflow-2.0.1.dist-info → cursorflow-2.0.3.dist-info}/METADATA +1 -1
- {cursorflow-2.0.1.dist-info → cursorflow-2.0.3.dist-info}/RECORD +10 -10
- {cursorflow-2.0.1.dist-info → cursorflow-2.0.3.dist-info}/WHEEL +0 -0
- {cursorflow-2.0.1.dist-info → cursorflow-2.0.3.dist-info}/entry_points.txt +0 -0
- {cursorflow-2.0.1.dist-info → cursorflow-2.0.3.dist-info}/licenses/LICENSE +0 -0
- {cursorflow-2.0.1.dist-info → cursorflow-2.0.3.dist-info}/top_level.txt +0 -0
cursorflow/__init__.py
CHANGED
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
|
-
|
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 (
|
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
|
-
|
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"📋
|
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
|
-
|
123
|
-
|
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
|
-
#
|
175
|
+
# Create new config or force recreate
|
126
176
|
project_type = detect_project_type(project_path)
|
127
177
|
|
128
178
|
config_template = {
|
@@ -140,15 +190,17 @@ def create_config_template(project_path: Path):
|
|
140
190
|
"debug_mode": False
|
141
191
|
},
|
142
192
|
"_project_type": project_type,
|
143
|
-
"_cursorflow_version":
|
193
|
+
"_cursorflow_version": current_version
|
144
194
|
}
|
145
195
|
|
146
196
|
import json
|
147
197
|
with open(config_path, "w") as f:
|
148
198
|
json.dump(config_template, f, indent=2)
|
149
199
|
|
150
|
-
|
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:
|
@@ -248,9 +300,15 @@ def setup_update_checking(project_path: Path):
|
|
248
300
|
json.dump(update_prefs, f, indent=2)
|
249
301
|
|
250
302
|
# Create initial version tracking
|
303
|
+
try:
|
304
|
+
import cursorflow
|
305
|
+
current_version = getattr(cursorflow, '__version__', '2.0.3')
|
306
|
+
except ImportError:
|
307
|
+
current_version = '2.0.3'
|
308
|
+
|
251
309
|
version_info = {
|
252
|
-
"installed_version":
|
253
|
-
"rules_version":
|
310
|
+
"installed_version": current_version,
|
311
|
+
"rules_version": current_version,
|
254
312
|
"installation_date": str(datetime.datetime.now().isoformat())
|
255
313
|
}
|
256
314
|
|
cursorflow/updater.py
CHANGED
@@ -335,8 +335,27 @@ class CursorFlowUpdater:
|
|
335
335
|
return False
|
336
336
|
|
337
337
|
async def _update_rules(self) -> bool:
|
338
|
-
"""Update rules from
|
339
|
-
|
338
|
+
"""Update rules from installed package"""
|
339
|
+
print("📝 Updating CursorFlow rules from installed package...")
|
340
|
+
|
341
|
+
try:
|
342
|
+
# Use the install_cursorflow_rules function to get latest rules from package
|
343
|
+
from .install_cursorflow_rules import install_cursorflow_rules
|
344
|
+
|
345
|
+
# Install rules from the newly updated package
|
346
|
+
success = install_cursorflow_rules(str(self.project_dir))
|
347
|
+
|
348
|
+
if success:
|
349
|
+
print("✅ Rules updated from installed package")
|
350
|
+
return True
|
351
|
+
else:
|
352
|
+
print("❌ Failed to update rules from package")
|
353
|
+
return False
|
354
|
+
|
355
|
+
except Exception as e:
|
356
|
+
self.logger.error(f"Rules update failed: {e}")
|
357
|
+
print(f"❌ Rules update failed: {e}")
|
358
|
+
return False
|
340
359
|
|
341
360
|
async def _update_dependencies(self) -> bool:
|
342
361
|
"""Update all dependencies"""
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: cursorflow
|
3
|
-
Version: 2.0.
|
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,8 +1,8 @@
|
|
1
|
-
cursorflow/__init__.py,sha256=
|
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=
|
4
|
-
cursorflow/install_cursorflow_rules.py,sha256=
|
5
|
-
cursorflow/updater.py,sha256=
|
3
|
+
cursorflow/cli.py,sha256=rqeDJTevUoTZYmZ5aGJBjxacDEsLKjeHbHuqP-P1q0I,25141
|
4
|
+
cursorflow/install_cursorflow_rules.py,sha256=v7VZm9zdLSWW_JwNKMY9oKQabpp7sLo0aM6s4vlWgVs,11792
|
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
|
8
8
|
cursorflow/core/browser_controller.py,sha256=OII52LBgN97-G-6mPCiqbFGbHnU9KtHaYB0qeylqo2U,125963
|
@@ -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.
|
30
|
-
cursorflow-2.0.
|
31
|
-
cursorflow-2.0.
|
32
|
-
cursorflow-2.0.
|
33
|
-
cursorflow-2.0.
|
34
|
-
cursorflow-2.0.
|
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,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|