@workerdeck/sandbox 0.12.0 → 0.15.0
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/README.md +13 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -85,6 +85,19 @@ path to the host's `require()`.
|
|
|
85
85
|
If you extend the bridge, keep to it: marshal by value, freeze or null-prototype anything you
|
|
86
86
|
construct for the guest, and give every capability its own timeout.
|
|
87
87
|
|
|
88
|
+
## Rules you cannot infer from the types
|
|
89
|
+
|
|
90
|
+
- **The VFS is a map, not a filesystem.** It is deliberately not a `node:fs` emulation: the
|
|
91
|
+
tab-side host runs it unpolyfilled, and one shared implementation across server and browser is
|
|
92
|
+
the point.
|
|
93
|
+
- **The engine variant is injected, never imported here.** The browser single-file build and the
|
|
94
|
+
server WASM-file build are different artifacts; only the host knows which side it is on.
|
|
95
|
+
- **The deadline preempts between bytecode ops, on whichever thread the guest runs.** In a tab
|
|
96
|
+
that is the UI thread unless you supply your own `execute` running the same engine in a Worker —
|
|
97
|
+
a time-boxed evaluation still blocks paint while it runs.
|
|
98
|
+
- **Guest results are untrusted input.** Whatever the sandbox returns was produced by the party you
|
|
99
|
+
sandboxed against, which is the whole reason it may be bridged to a browser at all.
|
|
100
|
+
|
|
88
101
|
## License
|
|
89
102
|
|
|
90
103
|
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workerdeck/sandbox",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The WorkerDeck execution sandbox: QuickJS-NG-in-WASM guest for untrusted, LLM-generated scripts with an in-memory scratch VFS, a hardened by-value host bridge (capability host functions only — no ambient fs/network), and interpreter-enforced memory + wall-clock limits. Engine-variant-injected so server (Node asyncify) and browser (singlefile asyncify) share one guest engine. Leaf package: depends on neither core/server nor any model SDK.",
|
|
6
6
|
"license": "MIT",
|