()
| 11 | * a real interactive terminal environment. |
| 12 | */ |
| 13 | export function isTmuxAvailable(): boolean { |
| 14 | // Skip on CI - tmux integration tests need a real terminal environment |
| 15 | if (process.env.CI === 'true' || process.env.CI === '1') { |
| 16 | return false |
| 17 | } |
| 18 | |
| 19 | try { |
| 20 | // First check if tmux is installed |
| 21 | execSync('which tmux', { stdio: 'pipe' }) |
| 22 | // Then verify tmux can actually run by creating and killing a test session |
| 23 | // This will fail if tmux server can't start (e.g., no socket directory on CI) |
| 24 | execSync('tmux new-session -d -s __codebuff_tmux_check__ && tmux kill-session -t __codebuff_tmux_check__', { |
| 25 | stdio: 'pipe', |
| 26 | timeout: 5000, |
| 27 | }) |
| 28 | return true |
| 29 | } catch { |
| 30 | return false |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | /** |
| 35 | * Check if the SDK is built by checking for the dist directory |
no outgoing calls
no test coverage detected