(input)
| 477 | let done = false; |
| 478 | let buf = ''; |
| 479 | const finishWithInput = (input) => { |
| 480 | if (done) return; |
| 481 | done = true; |
| 482 | try { |
| 483 | const sessionId = _extractHookSessionId(input); |
| 484 | if (sessionId) { |
| 485 | recordMarkedSession(sessionId, { |
| 486 | cwd: resolveProjectDir(), |
| 487 | source: String(process.env.EVOLVER_SESSION_SOURCE || (input && input.source) || '').trim() || undefined, |
| 488 | }); |
| 489 | } |
| 490 | } catch (_) { /* marking is best-effort; never block injection */ } |
| 491 | runInjection(); |
| 492 | }; |
| 493 | |
| 494 | // Watchdog: if stdin never ends (host passed no pipe, or hangs), proceed |
| 495 | // without a session_id rather than stalling the agent's session start. |
no test coverage detected