@musashishao/agent-kit 1.11.3 → 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 +47 -10
- 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/engineering-brief.md +6 -0
- package/.agent/workflows/research.md +1 -1
- 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,7 +190,7 @@ 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
|
|
|
@@ -392,7 +429,7 @@ def main():
|
|
|
392
429
|
(platform_info["claude_config"], "notebooklm-mcp", "Claude"),
|
|
393
430
|
(platform_info["cursor_config"], "notebooklm-mcp", "Cursor"),
|
|
394
431
|
(platform_info["vscode_config"], "notebooklm-mcp", "VS Code"),
|
|
395
|
-
(platform_info.get("antigravity_config"), "notebooklm", "Antigravity"),
|
|
432
|
+
(platform_info.get("antigravity_config"), "notebooklm-mcp", "Antigravity"),
|
|
396
433
|
]
|
|
397
434
|
|
|
398
435
|
for config_path, server_name, app_name in json_configs:
|
|
@@ -406,7 +443,7 @@ def main():
|
|
|
406
443
|
# TOML-based configs (Codex CLI)
|
|
407
444
|
codex_config = platform_info.get("codex_config")
|
|
408
445
|
if codex_config:
|
|
409
|
-
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):
|
|
410
447
|
print(f" ✅ Codex CLI")
|
|
411
448
|
else:
|
|
412
449
|
print(f" ⚠️ Codex CLI (bỏ qua)")
|
|
@@ -12,6 +12,12 @@ Distill PRD documents, specs, and meeting notes into a concise Engineering Brief
|
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
+
## Prerequisites
|
|
16
|
+
- NotebookLM MCP installed and authenticated
|
|
17
|
+
- Activate: @[skills/notebooklm-mcp]
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
15
21
|
## Why This Matters
|
|
16
22
|
|
|
17
23
|
**Problem:** Agents receive too many raw documents → Context Window gets full → Likely to hallucinate.
|