@musashishao/agent-kit 1.11.2 → 1.11.4
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.
- package/.agent/agents/game-conductor.md +1 -1
- package/.agent/agents/orchestrator.md +1 -1
- package/.agent/agents/project-planner.md +1 -1
- package/.agent/rules/REF_SKILLS.md +1 -2
- package/.agent/scripts/setup_all.py +44 -9
- package/.agent/scripts/setup_notebooklm_mcp.py +69 -14
- package/.agent/skills/game-development/sage-protocol/SKILL.md +1 -1
- package/.agent/skills/{notebooklm-integration → notebooklm-mcp}/SKILL.md +1 -1
- package/.agent/workflows/ai-agent.md +2 -0
- package/.agent/workflows/engineering-brief.md +8 -0
- package/.agent/workflows/gamekit-init.md +2 -0
- package/.agent/workflows/gamekit-launch.md +2 -0
- package/.agent/workflows/gamekit-plan.md +2 -0
- package/.agent/workflows/gamekit-qa.md +2 -0
- package/.agent/workflows/gamekit-spec.md +2 -0
- package/.agent/workflows/gamekit-tasks.md +2 -0
- package/.agent/workflows/generative-ui-init.md +2 -0
- package/.agent/workflows/marketing.md +2 -0
- package/.agent/workflows/pentest.md +2 -0
- package/.agent/workflows/research.md +3 -1
- package/.agent/workflows/saas.md +2 -0
- package/.agent/workflows/ui-verify.md +2 -0
- package/.agent/workflows/vibe-audit.md +2 -0
- package/.agent/workflows/vibe-game.md +2 -0
- package/bin/agent-kit +1 -1
- package/bin/cli.js +91 -0
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ name: orchestrator
|
|
|
3
3
|
description: Multi-agent coordination and task orchestration. Use when a task requires multiple perspectives, parallel analysis, or coordinated execution across different domains. Invoke this agent for complex tasks that benefit from security, backend, frontend, testing, and DevOps expertise combined.
|
|
4
4
|
tools: Read, Grep, Glob, Bash, Write, Edit, Agent
|
|
5
5
|
model: inherit
|
|
6
|
-
skills: clean-code, parallel-agents, behavioral-modes, plan-writing, brainstorming, architecture, lint-and-validate, powershell-windows, bash-linux, notebooklm-
|
|
6
|
+
skills: clean-code, parallel-agents, behavioral-modes, plan-writing, brainstorming, architecture, lint-and-validate, powershell-windows, bash-linux, notebooklm-mcp
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Orchestrator - Native Multi-Agent Coordination
|
|
@@ -3,7 +3,7 @@ name: project-planner
|
|
|
3
3
|
description: Smart project planning agent. Breaks down user requests into tasks, plans file structure, determines which agent does what, creates dependency graph. Use when starting new projects or planning major features.
|
|
4
4
|
tools: Read, Grep, Glob, Bash
|
|
5
5
|
model: inherit
|
|
6
|
-
skills: clean-code, app-builder, plan-writing, brainstorming, spec-writing, notebooklm-
|
|
6
|
+
skills: clean-code, app-builder, plan-writing, brainstorming, spec-writing, notebooklm-mcp
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Project Planner - Smart Project Planning
|
|
@@ -64,11 +64,10 @@ trigger: always_on
|
|
|
64
64
|
| `browser-extension-builder` | Manifest V3, content scripts, popup UIs (NEW) |
|
|
65
65
|
| `discord-bot-architect` | Discord.js, slash commands, interactions (NEW) |
|
|
66
66
|
| `agent-tool-builder` | MCP servers, function calling, sandboxing (NEW) |
|
|
67
|
-
| `notebooklm-
|
|
67
|
+
| `notebooklm-mcp` | **Google NotebookLM via MCP. Research, RAG, content gen (NEW)** |
|
|
68
68
|
| `brave-search` | **Brave Search MCP. Real-time web search** |
|
|
69
69
|
| `memory-mcp` | **Memory MCP. Long-term Knowledge Graph for Dual-Hemisphere Memory (NEW)** |
|
|
70
70
|
| `notion-mcp` | **Notion MCP. Workspace integration - search, read, write (NEW)** |
|
|
71
|
-
|
|
72
71
|
| `ai-agents-architect` | Multi-agent systems, orchestration, communication (NEW) |
|
|
73
72
|
| `ai-product` | AI PM, UX patterns, eval-driven dev (NEW) |
|
|
74
73
|
| `ai-wrapper-product` | AI wrappers, cost optimization, moats (NEW) |
|
|
@@ -39,10 +39,21 @@ def check_python_version():
|
|
|
39
39
|
sys.exit(1)
|
|
40
40
|
|
|
41
41
|
def create_venv():
|
|
42
|
-
"""Create a virtual environment
|
|
42
|
+
"""Create a virtual environment with robust error handling for Linux."""
|
|
43
43
|
if not VENV_DIR.exists():
|
|
44
44
|
print(f"📦 Đang tạo môi trường Python cô lập (Virtual Env) tại {VENV_DIR}...")
|
|
45
|
-
|
|
45
|
+
try:
|
|
46
|
+
# Try standard venv
|
|
47
|
+
subprocess.run([sys.executable, "-m", "venv", str(VENV_DIR)], check=True, capture_output=True)
|
|
48
|
+
except subprocess.CalledProcessError:
|
|
49
|
+
try:
|
|
50
|
+
# Try without pip (common failure point on Ubuntu)
|
|
51
|
+
print("⚠️ Venv chuẩn thất bại, đang thử tạo không kèm pip...")
|
|
52
|
+
subprocess.run([sys.executable, "-m", "venv", "--without-pip", str(VENV_DIR)], check=True)
|
|
53
|
+
except Exception as e:
|
|
54
|
+
print(f"❌ Không thể tạo môi trường: {e}")
|
|
55
|
+
print("💡 Giải pháp: Chạy 'sudo apt install python3-venv -y'")
|
|
56
|
+
sys.exit(1)
|
|
46
57
|
|
|
47
58
|
# Get venv python
|
|
48
59
|
if sys.platform == "win32":
|
|
@@ -50,16 +61,40 @@ def create_venv():
|
|
|
50
61
|
return str(VENV_DIR / "bin" / "python")
|
|
51
62
|
|
|
52
63
|
def install_deps(venv_python):
|
|
53
|
-
"""Install all necessary packages
|
|
54
|
-
print("📦 Đang cài đặt các thư viện bổ
|
|
64
|
+
"""Install all necessary packages with self-healing pip logic."""
|
|
65
|
+
print("📦 Đang kiểm tra và cài đặt các thư viện bổ trợ...")
|
|
66
|
+
|
|
55
67
|
try:
|
|
56
|
-
#
|
|
68
|
+
# 1. Check if pip exists
|
|
69
|
+
pip_check = subprocess.run([venv_python, "-m", "pip", "--version"], capture_output=True)
|
|
70
|
+
|
|
71
|
+
if pip_check.returncode != 0:
|
|
72
|
+
print("📦 Pip bị thiếu trong môi trường, đang thử cài đặt lại (get-pip.py)...")
|
|
73
|
+
try:
|
|
74
|
+
import urllib.request
|
|
75
|
+
get_pip_url = "https://bootstrap.pypa.io/get-pip.py"
|
|
76
|
+
get_pip_path = Path.cwd() / "get-pip.py"
|
|
77
|
+
with urllib.request.urlopen(get_pip_url) as response, open(get_pip_path, 'wb') as out_file:
|
|
78
|
+
shutil.copyfileobj(response, out_file)
|
|
79
|
+
|
|
80
|
+
subprocess.run([venv_python, str(get_pip_path)], check=True, capture_output=True)
|
|
81
|
+
get_pip_path.unlink() # Cleanup
|
|
82
|
+
print("✅ Đã cài pip thành công.")
|
|
83
|
+
except Exception as e:
|
|
84
|
+
print(f"⚠️ Không thể tự cài pip: {e}")
|
|
85
|
+
print("💡 Giải pháp: Chạy 'sudo apt install python3-pip -y'")
|
|
86
|
+
|
|
87
|
+
# 2. Upgrade pip and install requirements
|
|
57
88
|
subprocess.run([venv_python, "-m", "pip", "install", "--upgrade", "pip"], capture_output=True)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
89
|
+
result = subprocess.run([venv_python, "-m", "pip", "install"] + REQS, capture_output=True, text=True)
|
|
90
|
+
|
|
91
|
+
if result.returncode == 0:
|
|
92
|
+
print("✅ Đã cài đặt xong thư viện.")
|
|
93
|
+
else:
|
|
94
|
+
print(f"⚠️ Cảnh báo cài đặt: {result.stderr}")
|
|
95
|
+
|
|
61
96
|
except Exception as e:
|
|
62
|
-
print(f"⚠️
|
|
97
|
+
print(f"⚠️ Lỗi khi cài thư viện: {e}. Vẫn tiếp tục các bước khác...")
|
|
63
98
|
|
|
64
99
|
def run_sub_setup(script_name, args=None):
|
|
65
100
|
"""Run a sub-setup script from the kit."""
|
|
@@ -101,15 +101,25 @@ def create_venv(platform_info: Dict) -> Optional[str]:
|
|
|
101
101
|
if not venv_dir.exists():
|
|
102
102
|
print(f"📦 Đang tạo môi trường Python riêng...")
|
|
103
103
|
try:
|
|
104
|
-
|
|
104
|
+
# Try to create venv. On Ubuntu, this might fail or create it without pip.
|
|
105
|
+
subprocess.run(
|
|
105
106
|
[sys.executable, "-m", "venv", str(venv_dir)],
|
|
106
107
|
stdout=subprocess.DEVNULL,
|
|
107
|
-
stderr=subprocess.DEVNULL
|
|
108
|
+
stderr=subprocess.DEVNULL,
|
|
109
|
+
check=True
|
|
108
110
|
)
|
|
109
111
|
print(f"✅ Đã tạo môi trường tại: {venv_dir.name}")
|
|
110
112
|
except subprocess.CalledProcessError as e:
|
|
111
|
-
|
|
112
|
-
|
|
113
|
+
# If standard venv fails, try creating without pip as fallback
|
|
114
|
+
try:
|
|
115
|
+
subprocess.run(
|
|
116
|
+
[sys.executable, "-m", "venv", "--without-pip", str(venv_dir)],
|
|
117
|
+
check=True
|
|
118
|
+
)
|
|
119
|
+
print(f"✅ Đã tạo môi trường (chế độ --without-pip)")
|
|
120
|
+
except Exception:
|
|
121
|
+
print(f"❌ Không thể tạo môi trường: {e}")
|
|
122
|
+
return None
|
|
113
123
|
else:
|
|
114
124
|
print(f"✅ Môi trường Python đã tồn tại")
|
|
115
125
|
|
|
@@ -127,18 +137,45 @@ def create_venv(platform_info: Dict) -> Optional[str]:
|
|
|
127
137
|
|
|
128
138
|
|
|
129
139
|
def install_package(python_path: str) -> bool:
|
|
130
|
-
"""Install notebooklm-mcp-server package."""
|
|
140
|
+
"""Install notebooklm-mcp-server package with robust pip checking."""
|
|
131
141
|
print(f"📦 Đang cài đặt NotebookLM MCP...")
|
|
132
142
|
|
|
133
143
|
try:
|
|
134
|
-
#
|
|
144
|
+
# 1. Check if pip is available
|
|
145
|
+
pip_check = subprocess.run([python_path, "-m", "pip", "--version"], capture_output=True)
|
|
146
|
+
|
|
147
|
+
if pip_check.returncode != 0:
|
|
148
|
+
print("📦 Pip bị thiếu, đang thử khôi phục...")
|
|
149
|
+
# Try ensurepip
|
|
150
|
+
bootstrap = subprocess.run([python_path, "-m", "ensurepip", "--default-pip"], capture_output=True)
|
|
151
|
+
|
|
152
|
+
if bootstrap.returncode != 0:
|
|
153
|
+
print("📦 Đang thử tải pip trực tiếp (get-pip.py)...")
|
|
154
|
+
try:
|
|
155
|
+
import urllib.request
|
|
156
|
+
get_pip_url = "https://bootstrap.pypa.io/get-pip.py"
|
|
157
|
+
get_pip_path = Path.cwd() / "get-pip.py"
|
|
158
|
+
with urllib.request.urlopen(get_pip_url) as response, open(get_pip_path, 'wb') as out_file:
|
|
159
|
+
shutil.copyfileobj(response, out_file)
|
|
160
|
+
|
|
161
|
+
subprocess.run([python_path, str(get_pip_path)], check=True, capture_output=True)
|
|
162
|
+
get_pip_path.unlink() # Delete after use
|
|
163
|
+
print("✅ Đã cài pip thành công qua get-pip.py")
|
|
164
|
+
except Exception as e:
|
|
165
|
+
print(f"❌ Không thể tự cài pip: {e}")
|
|
166
|
+
print("💡 Giải pháp trên Ubuntu/Linux: Chạy 'sudo apt install python3-venv python3-pip -y' và chạy lại.")
|
|
167
|
+
return False
|
|
168
|
+
else:
|
|
169
|
+
print("✅ Đã khôi phục pip qua ensurepip")
|
|
170
|
+
|
|
171
|
+
# 2. Upgrade pip quietly
|
|
135
172
|
subprocess.run(
|
|
136
173
|
[python_path, "-m", "pip", "install", "--upgrade", "pip"],
|
|
137
174
|
capture_output=True,
|
|
138
175
|
check=False
|
|
139
176
|
)
|
|
140
177
|
|
|
141
|
-
# Install package
|
|
178
|
+
# 3. Install package
|
|
142
179
|
result = subprocess.run(
|
|
143
180
|
[python_path, "-m", "pip", "install", "--upgrade", MCP_SERVER_PACKAGE],
|
|
144
181
|
capture_output=True,
|
|
@@ -153,16 +190,34 @@ def install_package(python_path: str) -> bool:
|
|
|
153
190
|
return True
|
|
154
191
|
|
|
155
192
|
except Exception as e:
|
|
156
|
-
print(f"❌ Lỗi: {e}")
|
|
193
|
+
print(f"❌ Lỗi cài đặt: {e}")
|
|
157
194
|
return False
|
|
158
195
|
|
|
159
196
|
|
|
160
197
|
def get_wrapper_path() -> Optional[str]:
|
|
161
198
|
"""Get absolute path to wrapper script."""
|
|
162
|
-
|
|
199
|
+
# Search in multiple locations
|
|
200
|
+
search_paths = [
|
|
201
|
+
# 1. Project's installed .agent folder
|
|
202
|
+
Path.cwd() / WRAPPER_SCRIPT_REL,
|
|
203
|
+
# 2. Package source (when running from node_modules or repo)
|
|
204
|
+
Path(__file__).parent.parent / "mcp" / "servers" / "notebooklm" / "run_notebooklm_mcp.py",
|
|
205
|
+
# 3. Alongside this script's .agent folder
|
|
206
|
+
Path(__file__).parent.parent.parent / WRAPPER_SCRIPT_REL,
|
|
207
|
+
]
|
|
208
|
+
|
|
209
|
+
wrapper_path = None
|
|
210
|
+
for path in search_paths:
|
|
211
|
+
if path.exists():
|
|
212
|
+
wrapper_path = path
|
|
213
|
+
break
|
|
163
214
|
|
|
164
|
-
if not wrapper_path
|
|
165
|
-
print(f"❌ Không tìm thấy wrapper script
|
|
215
|
+
if not wrapper_path:
|
|
216
|
+
print(f"❌ Không tìm thấy wrapper script.")
|
|
217
|
+
print(f" Đã tìm tại:")
|
|
218
|
+
for p in search_paths:
|
|
219
|
+
print(f" - {p}")
|
|
220
|
+
print(f"\n Hãy chạy 'npx @musashishao/agent-kit init' trước.")
|
|
166
221
|
return None
|
|
167
222
|
|
|
168
223
|
# Make executable on Unix
|
|
@@ -172,7 +227,7 @@ def get_wrapper_path() -> Optional[str]:
|
|
|
172
227
|
except Exception:
|
|
173
228
|
pass
|
|
174
229
|
|
|
175
|
-
return str(wrapper_path)
|
|
230
|
+
return str(wrapper_path.resolve())
|
|
176
231
|
|
|
177
232
|
|
|
178
233
|
def select_profile() -> str:
|
|
@@ -374,7 +429,7 @@ def main():
|
|
|
374
429
|
(platform_info["claude_config"], "notebooklm-mcp", "Claude"),
|
|
375
430
|
(platform_info["cursor_config"], "notebooklm-mcp", "Cursor"),
|
|
376
431
|
(platform_info["vscode_config"], "notebooklm-mcp", "VS Code"),
|
|
377
|
-
(platform_info.get("antigravity_config"), "notebooklm", "Antigravity"),
|
|
432
|
+
(platform_info.get("antigravity_config"), "notebooklm-mcp", "Antigravity"),
|
|
378
433
|
]
|
|
379
434
|
|
|
380
435
|
for config_path, server_name, app_name in json_configs:
|
|
@@ -388,7 +443,7 @@ def main():
|
|
|
388
443
|
# TOML-based configs (Codex CLI)
|
|
389
444
|
codex_config = platform_info.get("codex_config")
|
|
390
445
|
if codex_config:
|
|
391
|
-
if update_toml_config(codex_config, "notebooklm", python_path, wrapper_path, profile):
|
|
446
|
+
if update_toml_config(codex_config, "notebooklm-mcp", python_path, wrapper_path, profile):
|
|
392
447
|
print(f" ✅ Codex CLI")
|
|
393
448
|
else:
|
|
394
449
|
print(f" ⚠️ Codex CLI (bỏ qua)")
|
|
@@ -6,10 +6,18 @@ description_vi: "Tạo Engineering Brief từ tài liệu thô qua NotebookLM. C
|
|
|
6
6
|
|
|
7
7
|
# Engineering Brief Workflow
|
|
8
8
|
|
|
9
|
+
$ARGUMENTS
|
|
10
|
+
|
|
9
11
|
Distill PRD documents, specs, and meeting notes into a concise Engineering Brief to inject into the Agent context.
|
|
10
12
|
|
|
11
13
|
---
|
|
12
14
|
|
|
15
|
+
## Prerequisites
|
|
16
|
+
- NotebookLM MCP installed and authenticated
|
|
17
|
+
- Activate: @[skills/notebooklm-mcp]
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
13
21
|
## Why This Matters
|
|
14
22
|
|
|
15
23
|
**Problem:** Agents receive too many raw documents → Context Window gets full → Likely to hallucinate.
|
|
@@ -6,6 +6,8 @@ description_en: "Generate implementation plan from approved game specification."
|
|
|
6
6
|
|
|
7
7
|
# /gamekit.plan - Game Implementation Plan
|
|
8
8
|
|
|
9
|
+
$ARGUMENTS
|
|
10
|
+
|
|
9
11
|
Generate a detailed implementation plan from an approved specification. Includes task breakdown, agent assignments, and file structure.
|
|
10
12
|
|
|
11
13
|
---
|
|
@@ -6,6 +6,8 @@ description_en: "Playtest and QA loop for iterative game refinement."
|
|
|
6
6
|
|
|
7
7
|
# /gamekit-qa - Evaluative Loop (QA & Refinement)
|
|
8
8
|
|
|
9
|
+
$ARGUMENTS
|
|
10
|
+
|
|
9
11
|
Playtest, collect feedback, and iteratively refine game feel and balance.
|
|
10
12
|
|
|
11
13
|
> 💡 **Migrated from:** `/game-hybrid` Tier 3
|
|
@@ -6,6 +6,8 @@ description_en: "Create game specification with Explained Q&A for all stakeholde
|
|
|
6
6
|
|
|
7
7
|
# /gamekit.spec - Game Specification Creation
|
|
8
8
|
|
|
9
|
+
$ARGUMENTS
|
|
10
|
+
|
|
9
11
|
Create a comprehensive game specification using the Explained Q&A system. Designed for ALL stakeholders (Developer, PM, Designer).
|
|
10
12
|
|
|
11
13
|
---
|
|
@@ -6,6 +6,8 @@ description_en: "Generate executable task list from approved game plan."
|
|
|
6
6
|
|
|
7
7
|
# /gamekit.tasks - Game Task List Generation
|
|
8
8
|
|
|
9
|
+
$ARGUMENTS
|
|
10
|
+
|
|
9
11
|
Generate an executable task list with checkboxes, session tracking, and progress overview from an approved implementation plan.
|
|
10
12
|
|
|
11
13
|
---
|
|
@@ -6,6 +6,8 @@ description_vi: Workflow lập kế hoạch marketing tăng trưởng và chiế
|
|
|
6
6
|
|
|
7
7
|
# 🚀 /marketing - Campaign Planning Workflow
|
|
8
8
|
|
|
9
|
+
$ARGUMENTS
|
|
10
|
+
|
|
9
11
|
This workflow guides you through the process of planning and executing a high-impact marketing campaign for your product.
|
|
10
12
|
|
|
11
13
|
## 📋 Steps
|
|
@@ -6,13 +6,15 @@ description_vi: "Workflow nghiên cứu sâu với NotebookLM. Quét web, phân
|
|
|
6
6
|
|
|
7
7
|
# Deep Research Workflow
|
|
8
8
|
|
|
9
|
+
$ARGUMENTS
|
|
10
|
+
|
|
9
11
|
Use NotebookLM MCP to deeply research a topic, import sources, and synthesize insights.
|
|
10
12
|
|
|
11
13
|
---
|
|
12
14
|
|
|
13
15
|
## Prerequisites
|
|
14
16
|
- NotebookLM MCP installed and authenticated
|
|
15
|
-
-
|
|
17
|
+
- Activate: @[skills/notebooklm-mcp]
|
|
16
18
|
|
|
17
19
|
---
|
|
18
20
|
|
package/.agent/workflows/saas.md
CHANGED
package/bin/agent-kit
CHANGED
|
@@ -18,6 +18,7 @@ const VERSION = packageJson.version;
|
|
|
18
18
|
|
|
19
19
|
// Commands handled by cli.js (Node.js)
|
|
20
20
|
const CLI_JS_COMMANDS = [
|
|
21
|
+
'setup', // Full setup: init + NotebookLM + Codex sync
|
|
21
22
|
'init',
|
|
22
23
|
'update',
|
|
23
24
|
'status',
|
|
@@ -46,7 +47,6 @@ const PYTHON_CLI_COMMANDS = [
|
|
|
46
47
|
'setup-notion-mcp',
|
|
47
48
|
'memory-sync',
|
|
48
49
|
'notebooklm-status',
|
|
49
|
-
'setup',
|
|
50
50
|
'install'
|
|
51
51
|
];
|
|
52
52
|
|
package/bin/cli.js
CHANGED
|
@@ -35,6 +35,7 @@ const translations = {
|
|
|
35
35
|
usage: 'Usage:',
|
|
36
36
|
usageText: ` npx ${PACKAGE_NAME} <command> [options]`,
|
|
37
37
|
commands: 'Commands:',
|
|
38
|
+
setup: '⭐ FULL SETUP: Install everything in one command',
|
|
38
39
|
init: 'Install .agent folder into current project',
|
|
39
40
|
ai: 'AI Infrastructure management (init, sync, status)',
|
|
40
41
|
setupCodex: 'Sync workflows with Codex CLI slash commands',
|
|
@@ -164,6 +165,7 @@ ${colors.bright}${t.usage}${colors.reset}
|
|
|
164
165
|
${t.usageText}
|
|
165
166
|
|
|
166
167
|
${colors.bright}${t.commands}${colors.reset}
|
|
168
|
+
${colors.bright}${colors.yellow}setup${colors.reset} ${t.setup || '⭐ Full setup: init + NotebookLM + Codex'}
|
|
167
169
|
${colors.cyan}init${colors.reset} ${t.init}
|
|
168
170
|
${colors.cyan}ai${colors.reset} ${t.ai}
|
|
169
171
|
${colors.cyan}setup-codex${colors.reset} ${t.setupCodex}
|
|
@@ -314,6 +316,92 @@ ${colors.bright}📚 Documentation:${colors.reset}
|
|
|
314
316
|
}
|
|
315
317
|
}
|
|
316
318
|
|
|
319
|
+
/**
|
|
320
|
+
* Setup command - Install everything in one go
|
|
321
|
+
* Runs: init + setup-notebooklm + setup-codex
|
|
322
|
+
*/
|
|
323
|
+
function setupCommand(options) {
|
|
324
|
+
log.title('🚀 Agent Kit Full Setup');
|
|
325
|
+
console.log(`
|
|
326
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
327
|
+
║ AGENT KIT - FULL INSTALLATION ║
|
|
328
|
+
║ Cài đặt hoàn chỉnh chỉ với 1 lệnh duy nhất ║
|
|
329
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
330
|
+
`);
|
|
331
|
+
|
|
332
|
+
const steps = [
|
|
333
|
+
{ name: 'Agent Kit Core', desc: 'Cài đặt .agent folder' },
|
|
334
|
+
{ name: 'NotebookLM MCP', desc: 'Cài MCP server cho research' },
|
|
335
|
+
{ name: 'Codex CLI', desc: 'Sync slash commands' }
|
|
336
|
+
];
|
|
337
|
+
|
|
338
|
+
console.log(`${colors.bright}📋 Các bước sẽ thực hiện:${colors.reset}`);
|
|
339
|
+
steps.forEach((s, i) => {
|
|
340
|
+
console.log(` ${i + 1}. ${s.name} - ${s.desc}`);
|
|
341
|
+
});
|
|
342
|
+
console.log('');
|
|
343
|
+
|
|
344
|
+
// Step 1: Init (install .agent folder)
|
|
345
|
+
console.log(`\n${colors.bright}[1/3] Installing Agent Kit Core...${colors.reset}`);
|
|
346
|
+
try {
|
|
347
|
+
// Check if already exists
|
|
348
|
+
const agentDir = path.join(process.cwd(), '.agent');
|
|
349
|
+
if (fs.existsSync(agentDir) && !options.force) {
|
|
350
|
+
log.info('.agent folder already exists, skipping...');
|
|
351
|
+
} else {
|
|
352
|
+
initCommand({ ...options, quiet: true, force: options.force });
|
|
353
|
+
log.success('Agent Kit Core installed!');
|
|
354
|
+
}
|
|
355
|
+
} catch (e) {
|
|
356
|
+
log.error(`Init failed: ${e.message}`);
|
|
357
|
+
return;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
// Step 2: Setup NotebookLM MCP
|
|
361
|
+
console.log(`\n${colors.bright}[2/3] Setting up NotebookLM MCP...${colors.reset}`);
|
|
362
|
+
try {
|
|
363
|
+
const scriptPath = path.join(process.cwd(), '.agent/scripts/setup_notebooklm_mcp.py');
|
|
364
|
+
if (fs.existsSync(scriptPath)) {
|
|
365
|
+
execSync(`python3 "${scriptPath}"`, { stdio: 'inherit' });
|
|
366
|
+
log.success('NotebookLM MCP configured!');
|
|
367
|
+
} else {
|
|
368
|
+
log.warn('NotebookLM setup script not found, skipping...');
|
|
369
|
+
}
|
|
370
|
+
} catch (e) {
|
|
371
|
+
log.warn(`NotebookLM setup skipped: ${e.message}`);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
// Step 3: Setup Codex CLI
|
|
375
|
+
console.log(`\n${colors.bright}[3/3] Syncing with Codex CLI...${colors.reset}`);
|
|
376
|
+
try {
|
|
377
|
+
setupCodexCommand({ ...options, quiet: true });
|
|
378
|
+
log.success('Codex CLI synced!');
|
|
379
|
+
} catch (e) {
|
|
380
|
+
log.warn(`Codex sync skipped: ${e.message}`);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
// Final summary
|
|
384
|
+
console.log(`
|
|
385
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
386
|
+
║ 🎉 SETUP HOÀN TẤT! ║
|
|
387
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
388
|
+
|
|
389
|
+
${colors.bright}📌 Bước tiếp theo:${colors.reset}
|
|
390
|
+
1. Xác thực NotebookLM (nếu muốn dùng):
|
|
391
|
+
${colors.cyan}notebooklm-mcp-auth${colors.reset}
|
|
392
|
+
|
|
393
|
+
2. Restart AI tools của bạn (Codex, Cursor, Claude...)
|
|
394
|
+
|
|
395
|
+
3. Bắt đầu sử dụng:
|
|
396
|
+
${colors.cyan}/brainstorm${colors.reset} - Lên ý tưởng
|
|
397
|
+
${colors.cyan}/create${colors.reset} - Tạo app mới
|
|
398
|
+
${colors.cyan}/debug${colors.reset} - Fix lỗi
|
|
399
|
+
|
|
400
|
+
${colors.bright}📚 Docs:${colors.reset} .agent/ARCHITECTURE.md
|
|
401
|
+
${colors.bright}🆘 Help:${colors.reset} npx @musashishao/agent-kit doctor
|
|
402
|
+
`);
|
|
403
|
+
}
|
|
404
|
+
|
|
317
405
|
function setupCodexCommand(options) {
|
|
318
406
|
const lang = getSystemLanguage();
|
|
319
407
|
const t = translations[lang] || translations.en;
|
|
@@ -1581,6 +1669,9 @@ if (templateIndex !== -1 && args[templateIndex + 1]) {
|
|
|
1581
1669
|
|
|
1582
1670
|
// Execute command
|
|
1583
1671
|
switch (command) {
|
|
1672
|
+
case 'setup':
|
|
1673
|
+
setupCommand(options);
|
|
1674
|
+
break;
|
|
1584
1675
|
case 'init':
|
|
1585
1676
|
initCommand(options);
|
|
1586
1677
|
break;
|