MCPcopy Create free account
hub / github.com/EvoMap/evolver / finishWithInput

Function finishWithInput

src/adapters/scripts/evolver-session-start.js:479–492  ·  view source on GitHub ↗
(input)

Source from the content-addressed store, hash-verified

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.

Callers 1

mainFunction · 0.85

Calls 4

_extractHookSessionIdFunction · 0.85
recordMarkedSessionFunction · 0.85
resolveProjectDirFunction · 0.85
runInjectionFunction · 0.85

Tested by

no test coverage detected