ninja-terminals 2.2.0 → 2.2.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/mcp-server.js +13 -0
- package/package.json +1 -1
package/mcp-server.js
CHANGED
|
@@ -698,6 +698,19 @@ async function main() {
|
|
|
698
698
|
// Start HTTP server for browser UI
|
|
699
699
|
httpServer.listen(HTTP_PORT, () => {
|
|
700
700
|
console.error(`Ninja Terminals HTTP server running on http://localhost:${HTTP_PORT}`);
|
|
701
|
+
|
|
702
|
+
// Auto-spawn terminals based on tier (NINJA_TERMINAL_COUNT env var)
|
|
703
|
+
// Free = 2, Paid = 4
|
|
704
|
+
const terminalCount = parseInt(process.env.NINJA_TERMINAL_COUNT || '2', 10);
|
|
705
|
+
const labels = ['T1', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7', 'T8'];
|
|
706
|
+
|
|
707
|
+
console.error(`Auto-spawning ${terminalCount} terminals...`);
|
|
708
|
+
for (let i = 0; i < terminalCount; i++) {
|
|
709
|
+
const label = labels[i] || `T${i + 1}`;
|
|
710
|
+
spawnTerminal(label, [], process.cwd(), 'pro');
|
|
711
|
+
console.error(` Spawned ${label}`);
|
|
712
|
+
}
|
|
713
|
+
console.error(`All ${terminalCount} terminals ready`);
|
|
701
714
|
});
|
|
702
715
|
|
|
703
716
|
// Start MCP server on stdio
|
package/package.json
CHANGED