@adiholick/nvstudio-mcp 1.0.0 → 1.0.1
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/README.md +4 -3
- package/dist/index.js +17 -4
- package/dist/roblox-bridge.js +6 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -47,15 +47,16 @@ Salin konfigurasi ini:
|
|
|
47
47
|
{
|
|
48
48
|
"mcpServers": {
|
|
49
49
|
"nvstudio-mcp": {
|
|
50
|
-
"command": "
|
|
50
|
+
"command": "npx",
|
|
51
51
|
"args": [
|
|
52
|
-
"
|
|
52
|
+
"-y",
|
|
53
|
+
"@adiholick/nvstudio-mcp@latest"
|
|
53
54
|
]
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
58
|
```
|
|
58
|
-
*(
|
|
59
|
+
*(Dengan ini, AI Anda akan selalu mengunduh dan menjalankan versi terbaru dari server Bridge langsung dari NPM, tanpa perlu path folder lokal!)*
|
|
59
60
|
|
|
60
61
|
---
|
|
61
62
|
|
package/dist/index.js
CHANGED
|
@@ -129,11 +129,24 @@ async function main() {
|
|
|
129
129
|
const transport = new stdio_js_1.StdioServerTransport();
|
|
130
130
|
await server.connect(transport);
|
|
131
131
|
console.error("[nvstudio-mcp] MCP Server aktif melalui StdioServerTransport.");
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
console.error("[nvstudio-mcp] Koneksi stdin ditutup oleh IDE. Mematikan server...");
|
|
132
|
+
const shutdown = () => {
|
|
133
|
+
console.error("[nvstudio-mcp] Koneksi ditutup oleh IDE. Mematikan server...");
|
|
135
134
|
process.exit(0);
|
|
136
|
-
}
|
|
135
|
+
};
|
|
136
|
+
// Tangani penutupan koneksi
|
|
137
|
+
process.stdin.on('close', shutdown);
|
|
138
|
+
process.stdin.on('end', shutdown);
|
|
139
|
+
// Fallback: Cek apakah parent process (IDE) masih hidup secara berkala
|
|
140
|
+
setInterval(() => {
|
|
141
|
+
try {
|
|
142
|
+
// process.kill dengan signal 0 hanya mengecek keberadaan proses tanpa membunuhnya
|
|
143
|
+
process.kill(process.ppid, 0);
|
|
144
|
+
}
|
|
145
|
+
catch (e) {
|
|
146
|
+
console.error("[nvstudio-mcp] Parent process (IDE) sudah mati. Mematikan server untuk menghindari zombie connection...");
|
|
147
|
+
process.exit(0);
|
|
148
|
+
}
|
|
149
|
+
}, 3000);
|
|
137
150
|
}
|
|
138
151
|
main().catch((err) => {
|
|
139
152
|
console.error("[nvstudio-mcp] Gagal menjalankan MCP server:", err);
|
package/dist/roblox-bridge.js
CHANGED
|
@@ -22,8 +22,12 @@ function startBridgeServer(port = 3055) {
|
|
|
22
22
|
app.get('/api/tasks', (req, res) => {
|
|
23
23
|
if (!dashboardOpened) {
|
|
24
24
|
dashboardOpened = true;
|
|
25
|
-
const
|
|
26
|
-
|
|
25
|
+
const url = `http://localhost:${port}`;
|
|
26
|
+
const startCmd = process.platform === 'win32' ? `start "" "${url}"` : process.platform === 'darwin' ? `open "${url}"` : `xdg-open "${url}"`;
|
|
27
|
+
(0, child_process_1.exec)(startCmd, (error) => {
|
|
28
|
+
if (error)
|
|
29
|
+
console.error(`[Bridge] Gagal membuka browser:`, error);
|
|
30
|
+
});
|
|
27
31
|
console.error(`[Bridge] Pertama kali terhubung dengan Studio! Membuka Dashboard...`);
|
|
28
32
|
}
|
|
29
33
|
if (task_queue_1.taskQueue.length > 0) {
|