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

Function shouldSkipInjection

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

Source from the content-addressed store, hash-verified

456}
457
458function shouldSkipInjection() {
459 // Only apply dedup when explicitly enabled (set by Kiro adapter) OR when
460 // we detect a per-prompt-firing platform via PROMPT_SUBMIT heuristic in
461 // stdin. The stdin is drained in main(), so we rely on env flag here.
462 const dedupEnabled = String(process.env.EVOLVER_SESSION_START_DEDUP || '').toLowerCase() === '1'
463 || String(process.env.EVOLVER_SESSION_START_DEDUP || '').toLowerCase() === 'true';
464 if (!dedupEnabled) return false;
465
466 const ttlMs = Number(process.env.EVOLVER_SESSION_START_DEDUP_TTL_MS) || (30 * 60 * 1000);
467 return throttled(process.cwd(), ttlMs, getDedupStatePath());
468}
469
470// Drain the hook stdin (session context JSON) before running, so we can read the
471// tool's session_id and mark the session in the registry. The host passes the

Callers 1

runInjectionFunction · 0.85

Calls 2

throttledFunction · 0.85
getDedupStatePathFunction · 0.85

Tested by

no test coverage detected