| 88 | // - EVOLVER_HOOK_HOST=cursor (manual override) |
| 89 | // Escape hatch: EVOLVER_HOOK_VERBOSE=1 forces the message on regardless. |
| 90 | function isCursorHost() { |
| 91 | const verbose = String(process.env.EVOLVER_HOOK_VERBOSE || '').toLowerCase(); |
| 92 | if (verbose === '1' || verbose === 'true') return false; |
| 93 | if (String(process.env.EVOLVER_HOOK_HOST || '').toLowerCase() === 'cursor') return true; |
| 94 | if (String(process.env.TERM_PROGRAM || '').toLowerCase() === 'cursor') return true; |
| 95 | if (process.env.CURSOR_TRACE_ID) return true; |
| 96 | if (process.env.CURSOR_SESSION_ID) return true; |
| 97 | return false; |
| 98 | } |
| 99 | |
| 100 | function detectSignals(text) { |
| 101 | if (!text) return []; |