cursorflow 2.0.2__py3-none-any.whl → 2.0.4__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 +1 -1
- cursorflow/cli.py +11 -5
- cursorflow/install_cursorflow_rules.py +66 -14
- {cursorflow-2.0.2.dist-info → cursorflow-2.0.4.dist-info}/METADATA +1 -1
- {cursorflow-2.0.2.dist-info → cursorflow-2.0.4.dist-info}/RECORD +9 -9
- {cursorflow-2.0.2.dist-info → cursorflow-2.0.4.dist-info}/WHEEL +0 -0
- {cursorflow-2.0.2.dist-info → cursorflow-2.0.4.dist-info}/entry_points.txt +0 -0
- {cursorflow-2.0.2.dist-info → cursorflow-2.0.4.dist-info}/licenses/LICENSE +0 -0
- {cursorflow-2.0.2.dist-info → cursorflow-2.0.4.dist-info}/top_level.txt +0 -0
cursorflow/__init__.py
CHANGED
cursorflow/cli.py
CHANGED
@@ -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
|
-
|
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
|
-
|
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 (
|
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.4')
|
129
|
+
except ImportError:
|
130
|
+
current_version = '2.0.4'
|
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 = {
|
@@ -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
|
-
|
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.
|
305
|
+
current_version = getattr(cursorflow, '__version__', '2.0.4')
|
254
306
|
except ImportError:
|
255
|
-
current_version = '2.0.
|
307
|
+
current_version = '2.0.4'
|
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.
|
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
|
@@ -1,7 +1,7 @@
|
|
1
|
-
cursorflow/__init__.py,sha256=
|
1
|
+
cursorflow/__init__.py,sha256=lP0RXTBbo-BTIT7w4GezlQzHasC46QXTOwDW1BUZqMg,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=
|
3
|
+
cursorflow/cli.py,sha256=KD2yzVQvfoKqGgAQYp3TtWjRCuxH1EOtD-uA8ameDZ0,25388
|
4
|
+
cursorflow/install_cursorflow_rules.py,sha256=2HE7PQgSDPz2BLWBhdxRXTHtk8YHLITjq5GWbKD7EZs,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.
|
30
|
-
cursorflow-2.0.
|
31
|
-
cursorflow-2.0.
|
32
|
-
cursorflow-2.0.
|
33
|
-
cursorflow-2.0.
|
34
|
-
cursorflow-2.0.
|
29
|
+
cursorflow-2.0.4.dist-info/licenses/LICENSE,sha256=e4QbjAsj3bW-xgQOvQelr8sGLYDoqc48k6cKgCr_pBU,1080
|
30
|
+
cursorflow-2.0.4.dist-info/METADATA,sha256=PcY-kjD3pWWiGFR1HweY3RHs9_pHr9J63JMlzVdmJwA,10656
|
31
|
+
cursorflow-2.0.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
32
|
+
cursorflow-2.0.4.dist-info/entry_points.txt,sha256=-Ed_n4Uff7wClEtWS-Py6xmQabecB9f0QAOjX0w7ljA,51
|
33
|
+
cursorflow-2.0.4.dist-info/top_level.txt,sha256=t1UZwRyZP4u-ng2CEcNHmk_ZT4ibQxoihB2IjTF7ovc,11
|
34
|
+
cursorflow-2.0.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|