@adiholick/nvstudio-mcp 1.0.0 → 1.0.2
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 +18 -4
- package/dist/roblox-bridge.js +6 -2
- package/package.json +2 -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
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
1
2
|
"use strict";
|
|
2
3
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
4
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -129,11 +130,24 @@ async function main() {
|
|
|
129
130
|
const transport = new stdio_js_1.StdioServerTransport();
|
|
130
131
|
await server.connect(transport);
|
|
131
132
|
console.error("[nvstudio-mcp] MCP Server aktif melalui StdioServerTransport.");
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
console.error("[nvstudio-mcp] Koneksi stdin ditutup oleh IDE. Mematikan server...");
|
|
133
|
+
const shutdown = () => {
|
|
134
|
+
console.error("[nvstudio-mcp] Koneksi ditutup oleh IDE. Mematikan server...");
|
|
135
135
|
process.exit(0);
|
|
136
|
-
}
|
|
136
|
+
};
|
|
137
|
+
// Tangani penutupan koneksi
|
|
138
|
+
process.stdin.on('close', shutdown);
|
|
139
|
+
process.stdin.on('end', shutdown);
|
|
140
|
+
// Fallback: Cek apakah parent process (IDE) masih hidup secara berkala
|
|
141
|
+
setInterval(() => {
|
|
142
|
+
try {
|
|
143
|
+
// process.kill dengan signal 0 hanya mengecek keberadaan proses tanpa membunuhnya
|
|
144
|
+
process.kill(process.ppid, 0);
|
|
145
|
+
}
|
|
146
|
+
catch (e) {
|
|
147
|
+
console.error("[nvstudio-mcp] Parent process (IDE) sudah mati. Mematikan server untuk menghindari zombie connection...");
|
|
148
|
+
process.exit(0);
|
|
149
|
+
}
|
|
150
|
+
}, 3000);
|
|
137
151
|
}
|
|
138
152
|
main().catch((err) => {
|
|
139
153
|
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) {
|