MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / resolveMcpSessionIdleTtlMs

Function resolveMcpSessionIdleTtlMs

apps/host-selfhost/src/config.ts:200–211  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

198// lifetime of the process — only useful for diagnosing a client that cannot
199// tolerate re-initializing.
200const resolveMcpSessionIdleTtlMs = (): number | undefined => {
201 const raw = process.env.EXECUTOR_MCP_SESSION_IDLE_TTL_MS;
202 if (!raw) return undefined;
203 const parsed = Number(raw);
204 if (!Number.isFinite(parsed) || parsed < 0) {
205 // oxlint-disable-next-line executor/no-try-catch-or-throw, executor/no-error-constructor -- boundary: refuse to boot on a malformed operator knob
206 throw new Error(
207 `EXECUTOR_MCP_SESSION_IDLE_TTL_MS ${JSON.stringify(raw)} is not a non-negative number of milliseconds`,
208 );
209 }
210 return Math.floor(parsed);
211};
212
213// EXECUTOR_TRUSTED_ORIGINS — extra browser origins allowed to send
214// cookie-authenticated requests when one instance is deliberately reachable

Callers 1

loadConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected