feat: server-first terminal creation, broadcast-only WS clients
- Add POST /create-terminal endpoint with MAX_TERMINALS=5 limit - Server creates PTY, runs command, registers and broadcasts atomically - Frontend startTerminal() calls server first, connects in reconnect mode - Remove registerTerminalOnServer() — server handles registration - Separate broadcast-only WS clients from PTY clients (no phantom "main" PTY) - All broadcast functions use broadcastToAll() helper - Fix resume existing flow to create terminal with --resume flag
This commit is contained in:
@@ -9,6 +9,7 @@ export const SHELL = process.platform === 'win32' ? 'powershell.exe' : 'bash'
|
||||
export const SHELL_ARGS = process.platform === 'win32' ? ['-NoLogo', '-NoProfile'] : []
|
||||
export const DEFAULT_SESSION_ID = 'main'
|
||||
export const MAX_BUFFER_LINES = 10000
|
||||
export const MAX_TERMINALS = 5
|
||||
|
||||
// Database
|
||||
export const DB_PATH = 'agent-ui.db'
|
||||
|
||||
Reference in New Issue
Block a user