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

Function positiveMilliseconds

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

Source from the content-addressed store, hash-verified

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

Calls

no outgoing calls

Tested by

no test coverage detected