- 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
22 lines
671 B
TypeScript
22 lines
671 B
TypeScript
// Server configuration
|
|
export const PORT_HTTP = 4101
|
|
export const PORT_TERMINAL = 4103
|
|
export const PORT_GIT = 4105
|
|
|
|
// Terminal configuration
|
|
export const WORKING_DIR = process.cwd().replace(/[\\\/]server$/, '')
|
|
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'
|
|
|
|
// Recordings
|
|
export const RECORDINGS_DIR = 'recordings'
|
|
|
|
// User components
|
|
export const USER_COMPONENTS_DIR = 'user-components'
|