kern-sandbox 0.1.42 → 0.1.43
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.
- package/index.js +14 -5
- 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.
|
|
39
|
+
const VERSION = "0.1.43";
|
|
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
|
|
@@ -594,12 +594,21 @@ function findKern() {
|
|
|
594
594
|
throw new SandboxError(
|
|
595
595
|
"the `kern` binary was not found on PATH, and this is macOS: kern is Linux-only " +
|
|
596
596
|
"(no namespaces, no cgroups on a Mac), so there is no macOS build to find. " +
|
|
597
|
-
"Run inside a Linux VM (colima, Lima, OrbStack, UTM)
|
|
598
|
-
"
|
|
597
|
+
"Run inside a Linux VM (colima, Lima, OrbStack, UTM) and install it there with:\n" +
|
|
598
|
+
" curl -fsSL https://raw.githubusercontent.com/getkern/kern/main/install.sh | sh\n" +
|
|
599
|
+
"or set $KERN_BIN to a kern reachable from here.",
|
|
599
600
|
);
|
|
601
|
+
// THE COMMAND, NOT A LINK. `npm install kern-sandbox` does NOT bring the binary: this package is a
|
|
602
|
+
// wrapper around a process it does not ship, and the moment a user meets that fact is this error.
|
|
603
|
+
// It used to answer with a repository URL, which asks someone one paste away from working to go
|
|
604
|
+
// and read a page first. The same sentence the Python binding gives, deliberately: two wrappers
|
|
605
|
+
// around one runtime must not disagree about how to get it, and the installer line is the one the
|
|
606
|
+
// project's README leads with.
|
|
600
607
|
throw new SandboxError(
|
|
601
|
-
"the `kern` binary was not found on PATH
|
|
602
|
-
"
|
|
608
|
+
"the `kern` binary was not found on PATH. `npm install kern-sandbox` installs this wrapper, " +
|
|
609
|
+
"not the runtime it drives - install kern with:\n" +
|
|
610
|
+
" curl -fsSL https://raw.githubusercontent.com/getkern/kern/main/install.sh | sh\n" +
|
|
611
|
+
"or point $KERN_BIN at a kern you already have.",
|
|
603
612
|
);
|
|
604
613
|
}
|
|
605
614
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kern-sandbox",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.43",
|
|
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",
|