()
| 57 | const MIN_SEARCH_MS = 300; // below this, skip the search (finish {}) |
| 58 | |
| 59 | function getSearchBudgetMs() { |
| 60 | const n = parseInt(process.env.EVOLVER_RECALL_TIMEOUT_MS, 10); |
| 61 | // Hard cap at 2800 so even a max-budget search starts and ends before the |
| 62 | // 3300ms watchdog under any realistic startup cost. |
| 63 | return Number.isFinite(n) && n >= 500 && n <= 2800 ? n : 2000; |
| 64 | } |
| 65 | |
| 66 | function getMode() { |
| 67 | const v = String(process.env.EVOLVER_RECALL_MODE || '').toLowerCase().trim(); |