@iso4/sandbox 0.5.2 → 0.5.3
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/dist/index.d.mts +2 -2
- package/dist/index.mjs +4 -3
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -543,7 +543,7 @@ interface SandboxOptions {
|
|
|
543
543
|
*
|
|
544
544
|
* Above the budget sits one more, non-configurable line: the runtime
|
|
545
545
|
* never CREATES an isolate when measured usage plus the run's own
|
|
546
|
-
* `memoryMb` would cross 90 % of the container limit (minus a
|
|
546
|
+
* `memoryMb` would cross 90 % of the container limit (minus a 128 MB
|
|
547
547
|
* host reserve) — such a run fails with `ERR_CAPACITY` instead, so the
|
|
548
548
|
* newest admission can never be what tips the container into an OOM
|
|
549
549
|
* kill. Runs with `memoryMb: 0` (uncapped) are refused already from the
|
|
@@ -553,7 +553,7 @@ interface SandboxOptions {
|
|
|
553
553
|
* `dispose()`, and uncapped runs are never refused). Independent of
|
|
554
554
|
* `memoryMb`: usage is measured, not derived from per-isolate caps.
|
|
555
555
|
*
|
|
556
|
-
* Default: 80 % of what remains of the container limit after a
|
|
556
|
+
* Default: 80 % of what remains of the container limit after a 128 MB
|
|
557
557
|
* reserve for the Node host — container/cgroup-aware via
|
|
558
558
|
* `process.constrainedMemory()`, falling back to `os.totalmem()`.
|
|
559
559
|
* Services with a large host-side footprint should set this lower.
|
package/dist/index.mjs
CHANGED
|
@@ -3324,10 +3324,11 @@ function resolveWarmBudgetBytes(memoryBudgetMb) {
|
|
|
3324
3324
|
/**
|
|
3325
3325
|
* The Node-host reserve subtracted from the container limit before any
|
|
3326
3326
|
* capacity line is drawn. Mirrors the runtime's `container.rs`
|
|
3327
|
-
* `NODE_RESERVE_BYTES` — change both together.
|
|
3328
|
-
*
|
|
3327
|
+
* `NODE_RESERVE_BYTES` — change both together. Sized for a typical Node
|
|
3328
|
+
* host (~80 MB measured) with margin; a measured reserve replaces this
|
|
3329
|
+
* constant later.
|
|
3329
3330
|
*/
|
|
3330
|
-
const NODE_RESERVE_MB =
|
|
3331
|
+
const NODE_RESERVE_MB = 128;
|
|
3331
3332
|
/**
|
|
3332
3333
|
* Default memory budget (the 80% shedding mark): 80% of what remains of the
|
|
3333
3334
|
* container limit after the Node-host reserve — container/cgroup-aware via
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iso4/sandbox",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Fast, sandboxed V8 isolate runtime for agent-generated JavaScript. Two-process architecture for crash isolation.",
|
|
6
6
|
"keywords": [
|
|
@@ -49,10 +49,10 @@
|
|
|
49
49
|
"vitest": "^4.1.5"
|
|
50
50
|
},
|
|
51
51
|
"optionalDependencies": {
|
|
52
|
-
"@iso4/v8-darwin-arm64": "^0.5.
|
|
53
|
-
"@iso4/v8-darwin-x64": "^0.5.
|
|
54
|
-
"@iso4/v8-linux-arm64-gnu": "^0.5.
|
|
55
|
-
"@iso4/v8-linux-x64-gnu": "^0.5.
|
|
52
|
+
"@iso4/v8-darwin-arm64": "^0.5.3",
|
|
53
|
+
"@iso4/v8-darwin-x64": "^0.5.3",
|
|
54
|
+
"@iso4/v8-linux-arm64-gnu": "^0.5.3",
|
|
55
|
+
"@iso4/v8-linux-x64-gnu": "^0.5.3"
|
|
56
56
|
},
|
|
57
57
|
"engines": {
|
|
58
58
|
"node": ">=24.0.0"
|