foliko 1.0.80 → 1.0.82

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 (154) hide show
  1. package/.agent/agents/code-assistant.json +14 -0
  2. package/.agent/agents/email-assistant.json +14 -0
  3. package/.agent/agents/file-assistant.json +15 -0
  4. package/.agent/agents/system-assistant.json +15 -0
  5. package/.agent/agents/web-assistant.json +12 -0
  6. package/.agent/data/ambient/goals.json +50 -0
  7. package/.agent/data/ambient/memories.json +7 -0
  8. package/.agent/data/default.json +15 -31894
  9. package/.agent/data/plugins-state.json +146 -181
  10. package/.agent/data/scheduler/tasks.json +1 -0
  11. package/.agent/mcp_config.json +1 -0
  12. package/.agent/package.json +8 -0
  13. package/.agent/plugins/__pycache__/test_plugin.cpython-312.pyc +0 -0
  14. package/.agent/plugins/system-info/index.js +387 -0
  15. package/.agent/plugins/system-info/package.json +4 -0
  16. package/.agent/plugins/system-info/test.js +40 -0
  17. package/.agent/plugins/test_plugin.py +304 -0
  18. package/.agent/plugins.json +14 -5
  19. package/.agent/python-scripts/test_sample.py +24 -0
  20. package/.agent/skills/sysinfo/SKILL.md +38 -0
  21. package/.agent/skills/sysinfo/system-info.sh +130 -0
  22. package/.agent/skills/workflow/SKILL.md +324 -0
  23. package/.agent/workflows/email-digest.json +50 -0
  24. package/.agent/workflows/file-backup.json +21 -0
  25. package/.agent/workflows/get-ip-notify.json +32 -0
  26. package/.agent/workflows/news-aggregator.json +93 -0
  27. package/.agent/workflows/news-dashboard-v2.json +94 -0
  28. package/.agent/workflows/notification-batch.json +32 -0
  29. package/.claude/settings.local.json +171 -171
  30. package/.env.example +56 -56
  31. package/cli/src/ui/chat-ui.js +8 -8
  32. package/package.json +1 -1
  33. package/plugins/feishu-plugin.js +6 -6
  34. package/plugins/file-system-plugin.js +54 -11
  35. package/plugins/telegram-plugin.js +6 -6
  36. package/plugins/weixin-plugin.js +6 -6
  37. package/skills/find-skills/AGENTS.md +162 -162
  38. package/skills/find-skills/SKILL.md +133 -133
  39. package/skills/foliko-dev/SKILL.md +563 -583
  40. package/skills/python-plugin-dev/SKILL.md +238 -238
  41. package/src/core/agent-chat.js +141 -134
  42. package/.agent/.shared/ui-ux-pro-max/data/charts.csv +0 -26
  43. package/.agent/.shared/ui-ux-pro-max/data/colors.csv +0 -97
  44. package/.agent/.shared/ui-ux-pro-max/data/icons.csv +0 -101
  45. package/.agent/.shared/ui-ux-pro-max/data/landing.csv +0 -31
  46. package/.agent/.shared/ui-ux-pro-max/data/products.csv +0 -97
  47. package/.agent/.shared/ui-ux-pro-max/data/prompts.csv +0 -24
  48. package/.agent/.shared/ui-ux-pro-max/data/react-performance.csv +0 -45
  49. package/.agent/.shared/ui-ux-pro-max/data/stacks/flutter.csv +0 -53
  50. package/.agent/.shared/ui-ux-pro-max/data/stacks/html-tailwind.csv +0 -56
  51. package/.agent/.shared/ui-ux-pro-max/data/stacks/jetpack-compose.csv +0 -53
  52. package/.agent/.shared/ui-ux-pro-max/data/stacks/nextjs.csv +0 -53
  53. package/.agent/.shared/ui-ux-pro-max/data/stacks/nuxt-ui.csv +0 -51
  54. package/.agent/.shared/ui-ux-pro-max/data/stacks/nuxtjs.csv +0 -59
  55. package/.agent/.shared/ui-ux-pro-max/data/stacks/react-native.csv +0 -52
  56. package/.agent/.shared/ui-ux-pro-max/data/stacks/react.csv +0 -54
  57. package/.agent/.shared/ui-ux-pro-max/data/stacks/shadcn.csv +0 -61
  58. package/.agent/.shared/ui-ux-pro-max/data/stacks/svelte.csv +0 -54
  59. package/.agent/.shared/ui-ux-pro-max/data/stacks/swiftui.csv +0 -51
  60. package/.agent/.shared/ui-ux-pro-max/data/stacks/vue.csv +0 -50
  61. package/.agent/.shared/ui-ux-pro-max/data/styles.csv +0 -59
  62. package/.agent/.shared/ui-ux-pro-max/data/typography.csv +0 -58
  63. package/.agent/.shared/ui-ux-pro-max/data/ui-reasoning.csv +0 -101
  64. package/.agent/.shared/ui-ux-pro-max/data/ux-guidelines.csv +0 -100
  65. package/.agent/.shared/ui-ux-pro-max/data/web-interface.csv +0 -31
  66. package/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/core.cpython-313.pyc +0 -0
  67. package/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-313.pyc +0 -0
  68. package/.agent/.shared/ui-ux-pro-max/scripts/core.py +0 -258
  69. package/.agent/.shared/ui-ux-pro-max/scripts/design_system.py +0 -1067
  70. package/.agent/.shared/ui-ux-pro-max/scripts/search.py +0 -106
  71. package/.agent/ARCHITECTURE.md +0 -288
  72. package/.agent/agents/ambient-agent.md +0 -57
  73. package/.agent/agents/debugger.md +0 -55
  74. package/.agent/agents/email-assistant.md +0 -49
  75. package/.agent/agents/file-manager.md +0 -42
  76. package/.agent/agents/python-developer.md +0 -60
  77. package/.agent/agents/scheduler.md +0 -59
  78. package/.agent/agents/web-developer.md +0 -45
  79. package/.agent/mcp_config_updated.json +0 -12
  80. package/.agent/rules/GEMINI.md +0 -273
  81. package/.agent/rules/allow-rule.md +0 -77
  82. package/.agent/rules/log-rule.md +0 -83
  83. package/.agent/rules/security-rule.md +0 -93
  84. package/.agent/scripts/auto_preview.py +0 -148
  85. package/.agent/scripts/checklist.py +0 -217
  86. package/.agent/scripts/session_manager.py +0 -120
  87. package/.agent/scripts/verify_all.py +0 -327
  88. package/.agent/skills/api-patterns/SKILL.md +0 -81
  89. package/.agent/skills/api-patterns/api-style.md +0 -42
  90. package/.agent/skills/api-patterns/auth.md +0 -24
  91. package/.agent/skills/api-patterns/documentation.md +0 -26
  92. package/.agent/skills/api-patterns/graphql.md +0 -41
  93. package/.agent/skills/api-patterns/rate-limiting.md +0 -31
  94. package/.agent/skills/api-patterns/response.md +0 -37
  95. package/.agent/skills/api-patterns/rest.md +0 -40
  96. package/.agent/skills/api-patterns/scripts/api_validator.py +0 -211
  97. package/.agent/skills/api-patterns/security-testing.md +0 -122
  98. package/.agent/skills/api-patterns/trpc.md +0 -41
  99. package/.agent/skills/api-patterns/versioning.md +0 -22
  100. package/.agent/skills/app-builder/SKILL.md +0 -75
  101. package/.agent/skills/app-builder/agent-coordination.md +0 -71
  102. package/.agent/skills/app-builder/feature-building.md +0 -53
  103. package/.agent/skills/app-builder/project-detection.md +0 -34
  104. package/.agent/skills/app-builder/scaffolding.md +0 -118
  105. package/.agent/skills/app-builder/tech-stack.md +0 -40
  106. package/.agent/skills/app-builder/templates/SKILL.md +0 -39
  107. package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +0 -76
  108. package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +0 -92
  109. package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +0 -88
  110. package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +0 -88
  111. package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +0 -83
  112. package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +0 -90
  113. package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +0 -90
  114. package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +0 -122
  115. package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +0 -122
  116. package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +0 -169
  117. package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +0 -134
  118. package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +0 -83
  119. package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +0 -119
  120. package/.agent/skills/architecture/SKILL.md +0 -55
  121. package/.agent/skills/architecture/context-discovery.md +0 -43
  122. package/.agent/skills/architecture/examples.md +0 -94
  123. package/.agent/skills/architecture/pattern-selection.md +0 -68
  124. package/.agent/skills/architecture/patterns-reference.md +0 -50
  125. package/.agent/skills/architecture/trade-off-analysis.md +0 -77
  126. package/.agent/skills/clean-code/SKILL.md +0 -201
  127. package/.agent/skills/doc.md +0 -177
  128. package/.agent/skills/frontend-design/SKILL.md +0 -418
  129. package/.agent/skills/frontend-design/animation-guide.md +0 -331
  130. package/.agent/skills/frontend-design/color-system.md +0 -311
  131. package/.agent/skills/frontend-design/decision-trees.md +0 -418
  132. package/.agent/skills/frontend-design/motion-graphics.md +0 -306
  133. package/.agent/skills/frontend-design/scripts/accessibility_checker.py +0 -183
  134. package/.agent/skills/frontend-design/scripts/ux_audit.py +0 -722
  135. package/.agent/skills/frontend-design/typography-system.md +0 -345
  136. package/.agent/skills/frontend-design/ux-psychology.md +0 -1116
  137. package/.agent/skills/frontend-design/visual-effects.md +0 -383
  138. package/.agent/skills/i18n-localization/SKILL.md +0 -154
  139. package/.agent/skills/i18n-localization/scripts/i18n_checker.py +0 -241
  140. package/.agent/skills/mcp-builder/SKILL.md +0 -176
  141. package/.agent/skills/web-design-guidelines/SKILL.md +0 -57
  142. package/.agent/workflows/brainstorm.md +0 -113
  143. package/.agent/workflows/create.md +0 -59
  144. package/.agent/workflows/debug.md +0 -103
  145. package/.agent/workflows/deploy.md +0 -176
  146. package/.agent/workflows/enhance.md +0 -63
  147. package/.agent/workflows/orchestrate.md +0 -237
  148. package/.agent/workflows/plan.md +0 -89
  149. package/.agent/workflows/preview.md +0 -81
  150. package/.agent/workflows/simple-test.md +0 -42
  151. package/.agent/workflows/status.md +0 -86
  152. package/.agent/workflows/structured-orchestrate.md +0 -180
  153. package/.agent/workflows/test.md +0 -144
  154. package/.agent/workflows/ui-ux-pro-max.md +0 -296
@@ -1,148 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- Auto Preview - Antigravity Kit
4
- ==============================
5
- Manages (start/stop/status) the local development server for previewing the application.
6
-
7
- Usage:
8
- python .agent/scripts/auto_preview.py start [port]
9
- python .agent/scripts/auto_preview.py stop
10
- python .agent/scripts/auto_preview.py status
11
- """
12
-
13
- import os
14
- import sys
15
- import time
16
- import json
17
- import signal
18
- import argparse
19
- import subprocess
20
- from pathlib import Path
21
-
22
- AGENT_DIR = Path(".agent")
23
- PID_FILE = AGENT_DIR / "preview.pid"
24
- LOG_FILE = AGENT_DIR / "preview.log"
25
-
26
- def get_project_root():
27
- return Path(".").resolve()
28
-
29
- def is_running(pid):
30
- try:
31
- os.kill(pid, 0)
32
- return True
33
- except OSError:
34
- return False
35
-
36
- def get_start_command(root):
37
- pkg_file = root / "package.json"
38
- if not pkg_file.exists():
39
- return None
40
-
41
- with open(pkg_file, 'r') as f:
42
- data = json.load(f)
43
-
44
- scripts = data.get("scripts", {})
45
- if "dev" in scripts:
46
- return ["npm", "run", "dev"]
47
- elif "start" in scripts:
48
- return ["npm", "start"]
49
- return None
50
-
51
- def start_server(port=3000):
52
- if PID_FILE.exists():
53
- try:
54
- pid = int(PID_FILE.read_text().strip())
55
- if is_running(pid):
56
- print(f"āš ļø Preview already running (PID: {pid})")
57
- return
58
- except:
59
- pass # Invalid PID file
60
-
61
- root = get_project_root()
62
- cmd = get_start_command(root)
63
-
64
- if not cmd:
65
- print("āŒ No 'dev' or 'start' script found in package.json")
66
- sys.exit(1)
67
-
68
- # Add port env var if needed (simple heuristic)
69
- env = os.environ.copy()
70
- env["PORT"] = str(port)
71
-
72
- print(f"šŸš€ Starting preview on port {port}...")
73
-
74
- with open(LOG_FILE, "w") as log:
75
- process = subprocess.Popen(
76
- cmd,
77
- cwd=str(root),
78
- stdout=log,
79
- stderr=log,
80
- env=env,
81
- shell=True # Required for npm on windows often, or consistent path handling
82
- )
83
-
84
- PID_FILE.write_text(str(process.pid))
85
- print(f"āœ… Preview started! (PID: {process.pid})")
86
- print(f" Logs: {LOG_FILE}")
87
- print(f" URL: http://localhost:{port}")
88
-
89
- def stop_server():
90
- if not PID_FILE.exists():
91
- print("ā„¹ļø No preview server found.")
92
- return
93
-
94
- try:
95
- pid = int(PID_FILE.read_text().strip())
96
- if is_running(pid):
97
- # Try gentle kill first
98
- os.kill(pid, signal.SIGTERM) if sys.platform != 'win32' else subprocess.call(['taskkill', '/F', '/T', '/PID', str(pid)])
99
- print(f"šŸ›‘ Preview stopped (PID: {pid})")
100
- else:
101
- print("ā„¹ļø Process was not running.")
102
- except Exception as e:
103
- print(f"āŒ Error stopping server: {e}")
104
- finally:
105
- if PID_FILE.exists():
106
- PID_FILE.unlink()
107
-
108
- def status_server():
109
- running = False
110
- pid = None
111
- url = "Unknown"
112
-
113
- if PID_FILE.exists():
114
- try:
115
- pid = int(PID_FILE.read_text().strip())
116
- if is_running(pid):
117
- running = True
118
- # Heuristic for URL, strictly we should save it
119
- url = "http://localhost:3000"
120
- except:
121
- pass
122
-
123
- print("\n=== Preview Status ===")
124
- if running:
125
- print(f"āœ… Status: Running")
126
- print(f"šŸ”¢ PID: {pid}")
127
- print(f"🌐 URL: {url} (Likely)")
128
- print(f"šŸ“ Logs: {LOG_FILE}")
129
- else:
130
- print("⚪ Status: Stopped")
131
- print("===================\n")
132
-
133
- def main():
134
- parser = argparse.ArgumentParser()
135
- parser.add_argument("action", choices=["start", "stop", "status"])
136
- parser.add_argument("port", nargs="?", default="3000")
137
-
138
- args = parser.parse_args()
139
-
140
- if args.action == "start":
141
- start_server(int(args.port))
142
- elif args.action == "stop":
143
- stop_server()
144
- elif args.action == "status":
145
- status_server()
146
-
147
- if __name__ == "__main__":
148
- main()
@@ -1,217 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- Master Checklist Runner - Antigravity Kit
4
- ==========================================
5
-
6
- Orchestrates all validation scripts in priority order.
7
- Use this for incremental validation during development.
8
-
9
- Usage:
10
- python scripts/checklist.py . # Run core checks
11
- python scripts/checklist.py . --url <URL> # Include performance checks
12
-
13
- Priority Order:
14
- P0: Security Scan (vulnerabilities, secrets)
15
- P1: Lint & Type Check (code quality)
16
- P2: Schema Validation (if database exists)
17
- P3: Test Runner (unit/integration tests)
18
- P4: UX Audit (psychology laws, accessibility)
19
- P5: SEO Check (meta tags, structure)
20
- P6: Performance (lighthouse - requires URL)
21
- """
22
-
23
- import sys
24
- import subprocess
25
- import argparse
26
- from pathlib import Path
27
- from typing import List, Tuple, Optional
28
-
29
- # ANSI colors for terminal output
30
- class Colors:
31
- HEADER = '\033[95m'
32
- BLUE = '\033[94m'
33
- CYAN = '\033[96m'
34
- GREEN = '\033[92m'
35
- YELLOW = '\033[93m'
36
- RED = '\033[91m'
37
- ENDC = '\033[0m'
38
- BOLD = '\033[1m'
39
-
40
- def print_header(text: str):
41
- print(f"\n{Colors.BOLD}{Colors.CYAN}{'='*60}{Colors.ENDC}")
42
- print(f"{Colors.BOLD}{Colors.CYAN}{text.center(60)}{Colors.ENDC}")
43
- print(f"{Colors.BOLD}{Colors.CYAN}{'='*60}{Colors.ENDC}\n")
44
-
45
- def print_step(text: str):
46
- print(f"{Colors.BOLD}{Colors.BLUE}šŸ”„ {text}{Colors.ENDC}")
47
-
48
- def print_success(text: str):
49
- print(f"{Colors.GREEN}āœ… {text}{Colors.ENDC}")
50
-
51
- def print_warning(text: str):
52
- print(f"{Colors.YELLOW}āš ļø {text}{Colors.ENDC}")
53
-
54
- def print_error(text: str):
55
- print(f"{Colors.RED}āŒ {text}{Colors.ENDC}")
56
-
57
- # Define priority-ordered checks
58
- CORE_CHECKS = [
59
- ("Security Scan", ".agent/skills/vulnerability-scanner/scripts/security_scan.py", True),
60
- ("Lint Check", ".agent/skills/lint-and-validate/scripts/lint_runner.py", True),
61
- ("Schema Validation", ".agent/skills/database-design/scripts/schema_validator.py", False),
62
- ("Test Runner", ".agent/skills/testing-patterns/scripts/test_runner.py", False),
63
- ("UX Audit", ".agent/skills/frontend-design/scripts/ux_audit.py", False),
64
- ("SEO Check", ".agent/skills/seo-fundamentals/scripts/seo_checker.py", False),
65
- ]
66
-
67
- PERFORMANCE_CHECKS = [
68
- ("Lighthouse Audit", ".agent/skills/performance-profiling/scripts/lighthouse_audit.py", True),
69
- ("Playwright E2E", ".agent/skills/webapp-testing/scripts/playwright_runner.py", False),
70
- ]
71
-
72
- def check_script_exists(script_path: Path) -> bool:
73
- """Check if script file exists"""
74
- return script_path.exists() and script_path.is_file()
75
-
76
- def run_script(name: str, script_path: Path, project_path: str, url: Optional[str] = None) -> dict:
77
- """
78
- Run a validation script and capture results
79
-
80
- Returns:
81
- dict with keys: name, passed, output, skipped
82
- """
83
- if not check_script_exists(script_path):
84
- print_warning(f"{name}: Script not found, skipping")
85
- return {"name": name, "passed": True, "output": "", "skipped": True}
86
-
87
- print_step(f"Running: {name}")
88
-
89
- # Build command
90
- cmd = ["python", str(script_path), project_path]
91
- if url and ("lighthouse" in script_path.name.lower() or "playwright" in script_path.name.lower()):
92
- cmd.append(url)
93
-
94
- # Run script
95
- try:
96
- result = subprocess.run(
97
- cmd,
98
- capture_output=True,
99
- text=True,
100
- timeout=300 # 5 minute timeout
101
- )
102
-
103
- passed = result.returncode == 0
104
-
105
- if passed:
106
- print_success(f"{name}: PASSED")
107
- else:
108
- print_error(f"{name}: FAILED")
109
- if result.stderr:
110
- print(f" Error: {result.stderr[:200]}")
111
-
112
- return {
113
- "name": name,
114
- "passed": passed,
115
- "output": result.stdout,
116
- "error": result.stderr,
117
- "skipped": False
118
- }
119
-
120
- except subprocess.TimeoutExpired:
121
- print_error(f"{name}: TIMEOUT (>5 minutes)")
122
- return {"name": name, "passed": False, "output": "", "error": "Timeout", "skipped": False}
123
-
124
- except Exception as e:
125
- print_error(f"{name}: ERROR - {str(e)}")
126
- return {"name": name, "passed": False, "output": "", "error": str(e), "skipped": False}
127
-
128
- def print_summary(results: List[dict]):
129
- """Print final summary report"""
130
- print_header("šŸ“Š CHECKLIST SUMMARY")
131
-
132
- passed_count = sum(1 for r in results if r["passed"] and not r.get("skipped"))
133
- failed_count = sum(1 for r in results if not r["passed"] and not r.get("skipped"))
134
- skipped_count = sum(1 for r in results if r.get("skipped"))
135
-
136
- print(f"Total Checks: {len(results)}")
137
- print(f"{Colors.GREEN}āœ… Passed: {passed_count}{Colors.ENDC}")
138
- print(f"{Colors.RED}āŒ Failed: {failed_count}{Colors.ENDC}")
139
- print(f"{Colors.YELLOW}ā­ļø Skipped: {skipped_count}{Colors.ENDC}")
140
- print()
141
-
142
- # Detailed results
143
- for r in results:
144
- if r.get("skipped"):
145
- status = f"{Colors.YELLOW}ā­ļø {Colors.ENDC}"
146
- elif r["passed"]:
147
- status = f"{Colors.GREEN}āœ…{Colors.ENDC}"
148
- else:
149
- status = f"{Colors.RED}āŒ{Colors.ENDC}"
150
-
151
- print(f"{status} {r['name']}")
152
-
153
- print()
154
-
155
- if failed_count > 0:
156
- print_error(f"{failed_count} check(s) FAILED - Please fix before proceeding")
157
- return False
158
- else:
159
- print_success("All checks PASSED ✨")
160
- return True
161
-
162
- def main():
163
- parser = argparse.ArgumentParser(
164
- description="Run Antigravity Kit validation checklist",
165
- formatter_class=argparse.RawDescriptionHelpFormatter,
166
- epilog="""
167
- Examples:
168
- python scripts/checklist.py . # Core checks only
169
- python scripts/checklist.py . --url http://localhost:3000 # Include performance
170
- """
171
- )
172
- parser.add_argument("project", help="Project path to validate")
173
- parser.add_argument("--url", help="URL for performance checks (lighthouse, playwright)")
174
- parser.add_argument("--skip-performance", action="store_true", help="Skip performance checks even if URL provided")
175
-
176
- args = parser.parse_args()
177
-
178
- project_path = Path(args.project).resolve()
179
-
180
- if not project_path.exists():
181
- print_error(f"Project path does not exist: {project_path}")
182
- sys.exit(1)
183
-
184
- print_header("šŸš€ ANTIGRAVITY KIT - MASTER CHECKLIST")
185
- print(f"Project: {project_path}")
186
- print(f"URL: {args.url if args.url else 'Not provided (performance checks skipped)'}")
187
-
188
- results = []
189
-
190
- # Run core checks
191
- print_header("šŸ“‹ CORE CHECKS")
192
- for name, script_path, required in CORE_CHECKS:
193
- script = project_path / script_path
194
- result = run_script(name, script, str(project_path))
195
- results.append(result)
196
-
197
- # If required check fails, stop
198
- if required and not result["passed"] and not result.get("skipped"):
199
- print_error(f"CRITICAL: {name} failed. Stopping checklist.")
200
- print_summary(results)
201
- sys.exit(1)
202
-
203
- # Run performance checks if URL provided
204
- if args.url and not args.skip_performance:
205
- print_header("⚔ PERFORMANCE CHECKS")
206
- for name, script_path, required in PERFORMANCE_CHECKS:
207
- script = project_path / script_path
208
- result = run_script(name, script, str(project_path), args.url)
209
- results.append(result)
210
-
211
- # Print summary
212
- all_passed = print_summary(results)
213
-
214
- sys.exit(0 if all_passed else 1)
215
-
216
- if __name__ == "__main__":
217
- main()
@@ -1,120 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- Session Manager - Antigravity Kit
4
- =================================
5
- Analyzes project state, detects tech stack, tracks file statistics, and provides
6
- a summary of the current session.
7
-
8
- Usage:
9
- python .agent/scripts/session_manager.py status [path]
10
- python .agent/scripts/session_manager.py info [path]
11
- """
12
-
13
- import os
14
- import json
15
- import argparse
16
- from pathlib import Path
17
- from typing import Dict, Any, List
18
-
19
- def get_project_root(path: str) -> Path:
20
- return Path(path).resolve()
21
-
22
- def analyze_package_json(root: Path) -> Dict[str, Any]:
23
- pkg_file = root / "package.json"
24
- if not pkg_file.exists():
25
- return {"type": "unknown", "dependencies": {}}
26
-
27
- try:
28
- with open(pkg_file, 'r', encoding='utf-8') as f:
29
- data = json.load(f)
30
-
31
- deps = data.get("dependencies", {})
32
- dev_deps = data.get("devDependencies", {})
33
- all_deps = {**deps, **dev_deps}
34
-
35
- stack = []
36
- if "next" in all_deps: stack.append("Next.js")
37
- elif "react" in all_deps: stack.append("React")
38
- elif "vue" in all_deps: stack.append("Vue")
39
- elif "svelte" in all_deps: stack.append("Svelte")
40
- elif "express" in all_deps: stack.append("Express")
41
- elif "nestjs" in all_deps or "@nestjs/core" in all_deps: stack.append("NestJS")
42
-
43
- if "tailwindcss" in all_deps: stack.append("Tailwind CSS")
44
- if "prisma" in all_deps: stack.append("Prisma")
45
- if "typescript" in all_deps: stack.append("TypeScript")
46
-
47
- return {
48
- "name": data.get("name", "unnamed"),
49
- "version": data.get("version", "0.0.0"),
50
- "stack": stack,
51
- "scripts": list(data.get("scripts", {}).keys())
52
- }
53
- except Exception as e:
54
- return {"error": str(e)}
55
-
56
- def count_files(root: Path) -> Dict[str, int]:
57
- stats = {"created": 0, "modified": 0, "total": 0}
58
- # Simple count for now, comprehensive tracking would require git diff or extensive history
59
- exclude = {".git", "node_modules", ".next", "dist", "build", ".agent", ".gemini", "__pycache__"}
60
-
61
- for root_dir, dirs, files in os.walk(root):
62
- dirs[:] = [d for d in dirs if d not in exclude]
63
- stats["total"] += len(files)
64
-
65
- return stats
66
-
67
- def detect_features(root: Path) -> List[str]:
68
- # Heuristic: look at folder names in src/
69
- features = []
70
- src = root / "src"
71
- if src.exists():
72
- possible_dirs = ["components", "modules", "features", "app", "pages", "services"]
73
- for d in possible_dirs:
74
- p = src / d
75
- if p.exists() and p.is_dir():
76
- # List subdirectories as likely features
77
- for child in p.iterdir():
78
- if child.is_dir():
79
- features.append(child.name)
80
- return features[:10] # Limit to top 10
81
-
82
- def print_status(root: Path):
83
- info = analyze_package_json(root)
84
- stats = count_files(root)
85
- features = detect_features(root)
86
-
87
- print("\n=== Project Status ===")
88
- print(f"\nšŸ“ Project: {info.get('name', root.name)}")
89
- print(f"šŸ“‚ Path: {root}")
90
- print(f"šŸ·ļø Type: {', '.join(info.get('stack', ['Generic']))}")
91
- print(f"šŸ“Š Status: Active")
92
-
93
- print("\nšŸ”§ Tech Stack:")
94
- for tech in info.get('stack', []):
95
- print(f" • {tech}")
96
-
97
- print(f"\nāœ… Detected Modules/Features ({len(features)}):")
98
- for feat in features:
99
- print(f" • {feat}")
100
- if not features:
101
- print(" (No distinct feature modules detected)")
102
-
103
- print(f"\nšŸ“„ Files: {stats['total']} total files tracked")
104
- print("\n====================\n")
105
-
106
- def main():
107
- parser = argparse.ArgumentParser(description="Session Manager")
108
- parser.add_argument("command", choices=["status", "info"], help="Command to run")
109
- parser.add_argument("path", nargs="?", default=".", help="Project path")
110
-
111
- args = parser.parse_args()
112
- root = get_project_root(args.path)
113
-
114
- if args.command == "status":
115
- print_status(root)
116
- elif args.command == "info":
117
- print(json.dumps(analyze_package_json(root), indent=2))
118
-
119
- if __name__ == "__main__":
120
- main()