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

Function antiAbuseTelemetryMode

src/config.js:233–245  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

231// services instead of trusted from the client.
232const ANTI_ABUSE_TELEMETRY_MODE = envStr('EVOLVER_ANTI_ABUSE_TELEMETRY', 'heartbeat');
233function antiAbuseTelemetryMode() {
234 const raw = process.env.EVOLVER_ANTI_ABUSE_TELEMETRY;
235 const v = String(raw == null ? '' : raw).toLowerCase().trim();
236 // Empty / whitespace-only counts as UNSET (same as envStr's '' -> fallback
237 // above): a blank `EVOLVER_ANTI_ABUSE_TELEMETRY=` line in a .env file must
238 // not silently disable the documented default-on behavior. Opt-out is
239 // explicit only.
240 if (v === '') return 'heartbeat';
241 if (v === '0' || v === 'false' || v === 'no' || v === 'off') return 'off';
242 return (v === '1' || v === 'true' || v === 'yes' || v === 'on' || v === 'heartbeat')
243 ? 'heartbeat'
244 : 'off';
245}
246
247// --- Validator mode (opt-out) ---
248// Node role: the evolver periodically fetches assigned validation tasks from

Callers 1

config.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected