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

Function resolveSandboxTimeoutMs

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

Source from the content-addressed store, hash-verified

260// sets the knob and typos it should find out at boot, not by watching a
261// runaway execution use the 5-minute default.
262const resolveSandboxTimeoutMs = (): number | undefined => {
263 const raw = process.env.EXECUTOR_SANDBOX_TIMEOUT_MS;
264 if (!raw) return undefined;
265 const parsed = Number(raw);
266 if (!Number.isFinite(parsed) || parsed <= 0) {
267 // oxlint-disable-next-line executor/no-try-catch-or-throw, executor/no-error-constructor -- boundary: refuse to boot on a malformed operator knob
268 throw new Error(
269 `EXECUTOR_SANDBOX_TIMEOUT_MS ${JSON.stringify(raw)} is not a positive number of milliseconds`,
270 );
271 }
272 return Math.floor(parsed);
273};
274
275// How long an MCP session may sit idle before the store evicts it. 0 disables
276// eviction, which restores the old behaviour of holding every session for the

Callers 1

loadConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected