MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / isGVisor

Function isGVisor

packages/cli/src/telemetry/agent_runtime.ts:259–269  ·  view source on GitHub ↗

* gVisor reports kernel string `4.19.0-gvisor` (current) or `4.4.0` (legacy * Sentry kernel). * * `4.19.0-gvisor` is unambiguous — no real Linux box reports that string. * `4.4.0` collides with Ubuntu 16.04 LTS / older real kernels, so we only * accept it as a gVisor signal when /proc/version A

()

Source from the content-addressed store, hash-verified

257 * accept it as a gVisor signal when /proc/version ALSO contains "gVisor".
258 */
259function isGVisor(): boolean {
260 const kernel = release();
261 if (kernel.includes("gvisor")) return true;
262 if (platform() !== "linux") return false;
263 try {
264 const procVersion = readFileSync("/proc/version", "utf-8");
265 return procVersion.includes("gVisor");
266 } catch {
267 return false;
268 }
269}
270
271function isDocker(): boolean {
272 if (existsSync("/.dockerenv")) return true;

Callers 2

detectSandboxRuntimeFunction · 0.85
isGeminiManagedAgentFunction · 0.85

Calls 1

releaseFunction · 0.85

Tested by

no test coverage detected