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

Function positiveMilliseconds

e2e/setup/mcp-session-timeouts.ts:9–14  ·  view source on GitHub ↗
(raw: string | undefined)

Source from the content-addressed store, hash-verified

7export const MCP_PAUSED_SESSION_IDLE_TIMEOUT_ENV = "MCP_PAUSED_SESSION_IDLE_TIMEOUT_MS";
8
9const positiveMilliseconds = (raw: string | undefined): number | undefined => {
10 if (!raw) return undefined;
11 const parsed = Number(raw);
12 if (!Number.isFinite(parsed) || parsed <= 0) return undefined;
13 return Math.floor(parsed);
14};
15
16export const ensureE2eMcpSessionTimeoutEnv = (): {
17 readonly sessionTimeoutMs: number;

Calls

no outgoing calls

Tested by

no test coverage detected