kern-sandbox 0.1.30 → 0.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +11 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -36,7 +36,7 @@ const crypto = require("crypto");
36
36
  const zlib = require("zlib");
37
37
  const { spawn, spawnSync } = require("child_process");
38
38
 
39
- const VERSION = "0.1.29";
39
+ const VERSION = "0.1.31";
40
40
 
41
41
  const DEFAULT_IMAGE = "python:3.12-slim";
42
42
  const WORKSPACE = "/workspace"; // where the persistent workspace is mounted inside every box
@@ -499,6 +499,16 @@ function findKern() {
499
499
  }
500
500
  }
501
501
  }
502
+ // On macOS the generic "install it" is a dead end: there is no macOS build to install. kern needs
503
+ // a Linux kernel, so the answer is a VM, and the error says which one rather than leaving the
504
+ // reader hunting for a download that does not exist.
505
+ if (process.platform === "darwin")
506
+ throw new SandboxError(
507
+ "the `kern` binary was not found on PATH, and this is macOS: kern is Linux-only " +
508
+ "(no namespaces, no cgroups on a Mac), so there is no macOS build to find. " +
509
+ "Run inside a Linux VM (colima, Lima, OrbStack, UTM), where kern installs normally, " +
510
+ "or set $KERN_BIN to a kern reachable from here. https://github.com/getkern/kern",
511
+ );
502
512
  throw new SandboxError(
503
513
  "the `kern` binary was not found on PATH - install it " +
504
514
  "(https://github.com/getkern/kern) or set $KERN_BIN",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kern-sandbox",
3
- "version": "0.1.30",
3
+ "version": "0.1.31",
4
4
  "description": "kern is a fast, rootless sandbox and virtual resource runtime for any workload, including untrusted and AI-generated code; kern-sandbox is its Node/TypeScript binding. Run untrusted or agent-generated code (Python/JS/Bash) in a real, kernel-enforced box in single-digit milliseconds, with no cloud, no account and no VM.",
5
5
  "keywords": [
6
6
  "sandbox",