sandboxedjs 0.2.20 → 0.2.21
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.cjs +2 -2
- package/dist/index.js +2 -2
- package/dist/worker-entry.js +1 -1
- package/docs/to_implement/agent.md +261 -0
- package/package.json +2 -1
package/dist/index.cjs
CHANGED
|
@@ -21103,7 +21103,7 @@ var wheels_default = {
|
|
|
21103
21103
|
|
|
21104
21104
|
// package.json
|
|
21105
21105
|
var package_default = {
|
|
21106
|
-
version: "0.2.
|
|
21106
|
+
version: "0.2.21"};
|
|
21107
21107
|
|
|
21108
21108
|
// src/python/extension-abi.ts
|
|
21109
21109
|
var EXTENSION_ABI = {
|
|
@@ -30005,7 +30005,7 @@ function applyEdits2(source, edits) {
|
|
|
30005
30005
|
function isNode4(value) {
|
|
30006
30006
|
return typeof value === "object" && value !== null && typeof value.type === "string";
|
|
30007
30007
|
}
|
|
30008
|
-
var EXTENSIONS = [".js", ".mjs", ".cjs", ".json", ".node"];
|
|
30008
|
+
var EXTENSIONS = [".js", ".mjs", ".cjs", ".json", ".node", ".ts", ".tsx"];
|
|
30009
30009
|
var PREFIX_ONLY_BUILTINS = /* @__PURE__ */ new Set(["test", "test/reporters", "sea", "sqlite"]);
|
|
30010
30010
|
var CONDITION_SETS = {
|
|
30011
30011
|
import: [["node", "import", "module", "default"], ["node", "require", "default"], ["default"]],
|
package/dist/index.js
CHANGED
|
@@ -21086,7 +21086,7 @@ var wheels_default = {
|
|
|
21086
21086
|
|
|
21087
21087
|
// package.json
|
|
21088
21088
|
var package_default = {
|
|
21089
|
-
version: "0.2.
|
|
21089
|
+
version: "0.2.21"};
|
|
21090
21090
|
|
|
21091
21091
|
// src/python/extension-abi.ts
|
|
21092
21092
|
var EXTENSION_ABI = {
|
|
@@ -29988,7 +29988,7 @@ function applyEdits2(source, edits) {
|
|
|
29988
29988
|
function isNode4(value) {
|
|
29989
29989
|
return typeof value === "object" && value !== null && typeof value.type === "string";
|
|
29990
29990
|
}
|
|
29991
|
-
var EXTENSIONS = [".js", ".mjs", ".cjs", ".json", ".node"];
|
|
29991
|
+
var EXTENSIONS = [".js", ".mjs", ".cjs", ".json", ".node", ".ts", ".tsx"];
|
|
29992
29992
|
var PREFIX_ONLY_BUILTINS = /* @__PURE__ */ new Set(["test", "test/reporters", "sea", "sqlite"]);
|
|
29993
29993
|
var CONDITION_SETS = {
|
|
29994
29994
|
import: [["node", "import", "module", "default"], ["node", "require", "default"], ["default"]],
|
package/dist/worker-entry.js
CHANGED
|
@@ -21935,7 +21935,7 @@ function f(e2, r2, t2) {
|
|
|
21935
21935
|
}
|
|
21936
21936
|
|
|
21937
21937
|
// src/node/commonjs-engine.ts
|
|
21938
|
-
var EXTENSIONS = [".js", ".mjs", ".cjs", ".json", ".node"];
|
|
21938
|
+
var EXTENSIONS = [".js", ".mjs", ".cjs", ".json", ".node", ".ts", ".tsx"];
|
|
21939
21939
|
var PREFIX_ONLY_BUILTINS = /* @__PURE__ */ new Set(["test", "test/reporters", "sea", "sqlite"]);
|
|
21940
21940
|
var CONDITION_SETS = {
|
|
21941
21941
|
import: [["node", "import", "module", "default"], ["node", "require", "default"], ["default"]],
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
# Agent feature
|
|
2
|
+
|
|
3
|
+
I want `agent` command in the sandbox. it is a seperate app like officesuit and vireo, we have to provide all the dependencies for it to run here in Sandboxedjs module but we don't provide the .sbjs package here, it will be downloaded from sandboxedjswheels.pages.dev site, the code of that site is in /Users/shazi/Projects/sandboxedjswheels.
|
|
4
|
+
|
|
5
|
+
# First Phase
|
|
6
|
+
|
|
7
|
+
## Objective and scope
|
|
8
|
+
|
|
9
|
+
Provide the runtime dependencies of the future `agent` application and the
|
|
10
|
+
transitive dependencies needed to install and execute them. The application stays
|
|
11
|
+
an independently downloaded `.sbjs` package from `sandboxedjswheels.pages.dev`;
|
|
12
|
+
SandboxedJs provides its execution environment, dependency resolver, and optional
|
|
13
|
+
runtime packs. Model creation, training, publication, and agent implementation are
|
|
14
|
+
separate work. This section is an implementation plan, not a claim of existing
|
|
15
|
+
package support.
|
|
16
|
+
|
|
17
|
+
Required targets:
|
|
18
|
+
|
|
19
|
+
- Transformers.js in the browser using its upstream browser inference backend.
|
|
20
|
+
- Python Transformers and CPU PyTorch using compatible upstream Linux packages.
|
|
21
|
+
- The actual upstream Linux Ollama distribution, including its server and CPU
|
|
22
|
+
runner. A wllama adapter, recompiled replacement, or implementation of only the
|
|
23
|
+
Ollama HTTP API does not satisfy this requirement.
|
|
24
|
+
- Owned, reproducible C/C++, Rust, and supporting build-tool distributions for
|
|
25
|
+
extending package coverage. Ownership means pinned upstream tools, build recipes,
|
|
26
|
+
patches, and release artifacts; it does not require inventing a compiler.
|
|
27
|
+
|
|
28
|
+
## Execution architecture: prerequisite before package installation
|
|
29
|
+
|
|
30
|
+
The current POSIX command layer, CPython-to-Wasm runtime, WASI host, and ELF
|
|
31
|
+
dispatch hooks are useful foundations. They do not execute arbitrary Linux
|
|
32
|
+
packages. The current original x64 engines only handle a small freestanding
|
|
33
|
+
instruction subset and reject dynamic linking; they cannot run Ollama, a normal
|
|
34
|
+
Linux Python interpreter, or PyTorch. See [browser architecture](../browser-runtime-architecture.md),
|
|
35
|
+
[binary backends](../developer-tool-packs.md), and [original x64 limits](../original-x64.md).
|
|
36
|
+
|
|
37
|
+
Use two explicit execution profiles:
|
|
38
|
+
|
|
39
|
+
| Profile | Runtime | Package ABI | Initial purpose |
|
|
40
|
+
| --- | --- | --- | --- |
|
|
41
|
+
| Browser/Wasm | Existing JS runtime, owned Wasm CPython, compatible WASI tools | Browser JS, exact SandboxedJs Python extension ABI, supported WASI imports | Transformers.js and individually validated scientific Wasm packages |
|
|
42
|
+
| Linux guest | Optional full-system CPU emulator compiled to Wasm, Linux kernel, persistent root filesystem | One selected Linux CPU architecture, glibc and native Python wheel tags | Unmodified Ollama, Python Transformers, CPU PyTorch, native compilers |
|
|
43
|
+
|
|
44
|
+
For the Linux profile, select a **64-bit architecture supported by the exact
|
|
45
|
+
Ollama and PyTorch releases**. Start by evaluating x86-64 with a glibc-based Debian
|
|
46
|
+
root filesystem. An emulator must boot that architecture and execute the CPU
|
|
47
|
+
instructions used by those binaries and their runners. Do not select a 32-bit
|
|
48
|
+
emulator just because it can boot a Linux image. Evaluate a browser-capable
|
|
49
|
+
full-system QEMU-derived build or another suitable engine; no working engine is
|
|
50
|
+
selected or supplied by this document. Its browser build, memory model, licensing,
|
|
51
|
+
and performance must be demonstrated before committing to it.
|
|
52
|
+
|
|
53
|
+
WebAssembly executes the emulator; the emulator executes Linux machine code and
|
|
54
|
+
Linux supplies the kernel ABI. Adding libc, WASI, or a compiler alone cannot make
|
|
55
|
+
an upstream Linux ELF binary execute in the existing Wasm runtime. Extending the
|
|
56
|
+
original translator to that level is a substantial alternative engineering
|
|
57
|
+
project, not a missing dependency that can simply be installed.
|
|
58
|
+
|
|
59
|
+
## Dependency packs and their dependencies
|
|
60
|
+
|
|
61
|
+
Pack names below are proposed distribution units, not existing npm packages.
|
|
62
|
+
Heavy assets should download on demand rather than become unconditional npm
|
|
63
|
+
dependencies of `sandboxedjs`.
|
|
64
|
+
|
|
65
|
+
| Pack | Direct contents | Dependencies and required capabilities |
|
|
66
|
+
| --- | --- | --- |
|
|
67
|
+
| `agent-runtime` | `.sbjs` loader, dependency manifest/resolver, execution-profile selection, process and service supervision | Existing container APIs; runtime-pack registry; version checks; install progress, cancellation, logs and cleanup |
|
|
68
|
+
| `browser-ml` | Pinned `@huggingface/transformers`, its resolved browser dependencies and matching ONNX Runtime Web assets | Correct browser export resolution; module workers; fetch, streams, typed arrays; Wasm assets; persistent model cache; optional SIMD, threads and WebGPU according to selected backend |
|
|
69
|
+
| `linux-machine` | Wasm CPU emulator, boot assets, Linux kernel, initramfs where required, guest control agent | Worker isolation, virtual CPU/MMU/interrupts/timers, disk and network devices, guest RAM, persistent disk adapter, host/guest RPC and termination |
|
|
70
|
+
| `linux-base` | glibc distribution rootfs, ELF loader, shell, coreutils, `apt`/`dpkg`, repository metadata/keyrings | Matching architecture and kernel; distro-resolved shared libraries; process, filesystem, clock, entropy, networking and certificate support |
|
|
71
|
+
| `linux-downloads` | `curl`, CA certificates, `tar`, `zstd`, gzip/xz/unzip as required | DNS and working TCP/TLS transport, writable temporary storage, trusted artifact metadata and extraction limits |
|
|
72
|
+
| `linux-python-ml` | Native CPython, `venv`, pip, CPU `torch`, `transformers` | Native wheels matching Python, architecture and glibc; full Python dependency closure and ELF library closure described below |
|
|
73
|
+
| `linux-ollama` | Pinned upstream Linux Ollama release, bundled libraries and CPU runners | `linux-machine`, `linux-base`, `linux-downloads`; runner-compatible CPU features; writable model store; local HTTP server access |
|
|
74
|
+
| `linux-build-tools` | Native C/C++ compiler, linker, Rust toolchain and build drivers | Linux profile, development headers, language standard libraries, build-system dependencies and package-specific source recipes |
|
|
75
|
+
| `wasm-build-sdk` | Emscripten/LLVM, supported WASI SDK, Rust Wasm target, owned Python extension SDK | Separate target sysroots and ABI locks; reproducible external build environment initially; compatible Wasm outputs tested in SandboxedJs |
|
|
76
|
+
|
|
77
|
+
Transformers.js uses ONNX Runtime in the browser; provide the assets matching the
|
|
78
|
+
locked package release and resolve browser exports instead of accidentally loading
|
|
79
|
+
native Node addons. WebGPU is optional for this path and does not accelerate the
|
|
80
|
+
Linux guest automatically. [Upstream Transformers.js documentation](https://huggingface.co/docs/transformers.js/en/index)
|
|
81
|
+
and [asset configuration](https://huggingface.co/docs/transformers.js/custom_usage).
|
|
82
|
+
|
|
83
|
+
## Linux facilities required underneath the packages
|
|
84
|
+
|
|
85
|
+
The Linux machine must supply more than command names:
|
|
86
|
+
|
|
87
|
+
- **CPU and memory:** 64-bit guest execution, virtual memory and page permissions,
|
|
88
|
+
floating point, required SIMD, atomics, and coherent thread behavior. Verify
|
|
89
|
+
CPUID/feature detection against the actual Ollama runner and PyTorch build.
|
|
90
|
+
Guest 64-bit addressing does not remove browser or emulator memory limits.
|
|
91
|
+
- **Processes:** executable loading, dynamic linking, `fork`/`exec`/`wait`, threads,
|
|
92
|
+
futexes, signals, pipes, polling/epoll, timers and service termination. A full
|
|
93
|
+
guest kernel provides these, but the emulator must support their foundations.
|
|
94
|
+
- **Filesystem:** permissions, symlinks, executable bits, atomic rename, locks,
|
|
95
|
+
mmap, large files, `/tmp`, `/proc`, `/sys`, `/dev`, entropy devices and shared
|
|
96
|
+
memory. Mount a persistent writable disk with capacity checks and recovery.
|
|
97
|
+
- **Networking:** guest loopback, DNS, TCP, TLS certificates and correct time;
|
|
98
|
+
downloads, package repositories, Hugging Face and the Ollama registry must work
|
|
99
|
+
through the configured outbound policy.
|
|
100
|
+
- **Host integration:** execute/upload/download APIs, streaming stdout/stderr,
|
|
101
|
+
cancellation, service readiness, and a bridge to guest HTTP ports, including
|
|
102
|
+
Ollama's default port 11434. Keep the guest disk separate from the current VFS
|
|
103
|
+
and transfer files explicitly with documented ownership and consistency.
|
|
104
|
+
|
|
105
|
+
Browsers cannot directly supply arbitrary raw TCP sockets. General Linux package
|
|
106
|
+
managers and native TLS clients require a guest network bridge to an explicitly
|
|
107
|
+
configured WebSocket/TCP relay or equivalent host transport. The current
|
|
108
|
+
fetch-based HTTP egress is not transparent networking for unmodified Linux
|
|
109
|
+
programs. A relay forwards network traffic; model computation still runs locally.
|
|
110
|
+
Document this infrastructure dependency. Offline operation is possible after
|
|
111
|
+
required packages and models are cached; arbitrary live registry access cannot be
|
|
112
|
+
promised on a static host alone.
|
|
113
|
+
|
|
114
|
+
## Python and scientific/ML dependency closure
|
|
115
|
+
|
|
116
|
+
Use native Python inside the Linux guest for the initial full Transformers/PyTorch
|
|
117
|
+
target. Choose the Python version together with the available CPU wheels, rather
|
|
118
|
+
than inheriting the Wasm interpreter version automatically. Resolve the exact
|
|
119
|
+
dependency tree from the selected releases and extras; the following is the
|
|
120
|
+
coverage inventory, not a substitute for a lockfile:
|
|
121
|
+
|
|
122
|
+
| Layer | Dependencies to resolve and test |
|
|
123
|
+
| --- | --- |
|
|
124
|
+
| Transformers | `transformers`, `huggingface-hub`, `tokenizers`, `safetensors`, NumPy, packaging, filelock, PyYAML, regex, tqdm, and the network/filesystem dependencies declared by the selected versions |
|
|
125
|
+
| PyTorch CPU | CPU-only `torch` wheel and its declared Python dependencies; included or required C/C++ runtime, OpenMP and math libraries; inspect ELF dependencies recursively |
|
|
126
|
+
| Model-dependent extras | SentencePiece/protobuf, Pillow, audio libraries, torchvision/torchaudio, or other processors only when required by the supported model and task |
|
|
127
|
+
| Additional science coverage | NumPy first; SciPy, pandas and scikit-learn as separately validated additions, with matching BLAS/LAPACK, OpenMP and Fortran runtimes where required |
|
|
128
|
+
| Download/cache stack | The selected hub client's HTTP/TLS and filesystem packages, cache locks, resumable downloads, credentials and offline-cache behavior |
|
|
129
|
+
|
|
130
|
+
Rust-based `tokenizers` and `safetensors`, C/C++ extensions, and PyTorch's native
|
|
131
|
+
libraries are transitive runtime artifacts even when a user only installs a
|
|
132
|
+
Python package. Prebuilt compatible wheels avoid compiling them at installation
|
|
133
|
+
time. Pin CPU wheels explicitly so resolution does not pull an unwanted CUDA
|
|
134
|
+
stack. The supported Python/torch combination must follow the chosen releases'
|
|
135
|
+
[Transformers installation requirements](https://huggingface.co/docs/transformers/installation)
|
|
136
|
+
and [PyTorch CPU installation instructions](https://pytorch.org/get-started/locally/).
|
|
137
|
+
|
|
138
|
+
For the existing Wasm Python profile, pure Python packages still need their native
|
|
139
|
+
dependencies ported. Build every compiled extension against this project's exact
|
|
140
|
+
Python/Emscripten/extension ABI; never relabel a manylinux wheel as Wasm. A full
|
|
141
|
+
PyTorch Wasm port is separate work and is not implied by providing Clang or Rust.
|
|
142
|
+
See the [owned Python architecture](../python/architecture.md) and
|
|
143
|
+
`python-runtime/abi/extension-abi.json` for the current ABI contract.
|
|
144
|
+
|
|
145
|
+
## Real Linux Ollama installation contract
|
|
146
|
+
|
|
147
|
+
Download a pinned upstream archive for the selected guest architecture, verify
|
|
148
|
+
its recorded digest, and install its binary **and required bundled libraries and
|
|
149
|
+
runners** inside the guest. Preserve upstream layout and resolve all additional
|
|
150
|
+
ELF shared-library requirements against the chosen rootfs. Maintain a release
|
|
151
|
+
inventory of loader paths, `DT_NEEDED` dependencies, minimum libc requirements
|
|
152
|
+
and runner CPU features; determine these from the selected artifact rather than
|
|
153
|
+
guessing a permanent list.
|
|
154
|
+
|
|
155
|
+
Support the upstream manual installation path and launch `ollama serve` through
|
|
156
|
+
the guest supervisor. Systemd is not required for this path. Running the upstream
|
|
157
|
+
installer script is a separate compatibility test because its service/user setup
|
|
158
|
+
can require additional distro tools. [Official Linux installation instructions](https://docs.ollama.com/linux).
|
|
159
|
+
|
|
160
|
+
Validate version reporting, server readiness, API access, model download/import,
|
|
161
|
+
persistence, restart and cancellation. These must execute the real upstream
|
|
162
|
+
Linux processes, with backend and version reported to the user. Browser WebGPU
|
|
163
|
+
does not provide CUDA or ROCm to these processes; CPU execution is the first
|
|
164
|
+
target. GPU passthrough/translation is outside this phase.
|
|
165
|
+
|
|
166
|
+
## Owned compiler and build dependencies
|
|
167
|
+
|
|
168
|
+
Separate the machine **running a compiler** from the architecture it **produces**.
|
|
169
|
+
A Linux `clang` executable needs the Linux guest; emitting Wasm does not make the
|
|
170
|
+
compiler itself browser-executable.
|
|
171
|
+
|
|
172
|
+
- **Native Linux toolchain:** GCC/G++ or Clang/LLVM, linker (GNU ld or LLD),
|
|
173
|
+
binutils/LLVM inspection tools, libc development headers, C++ headers/runtime,
|
|
174
|
+
`make`, CMake, Ninja, pkg-config, Git, patch and archive tools. Add Autoconf,
|
|
175
|
+
Automake and libtool when recipes require them.
|
|
176
|
+
- **Rust:** pinned `rustc`, Cargo, matching standard libraries and target support,
|
|
177
|
+
a working C linker, cached crates and locked dependency resolution. Use maturin
|
|
178
|
+
or setuptools-rust for relevant Python extension recipes. `rustup` may provision
|
|
179
|
+
a toolchain but is not itself the compiler or an inference dependency.
|
|
180
|
+
- **Python builds:** Python development headers, pip/build/setuptools/wheel,
|
|
181
|
+
Cython, meson-python/Meson or scikit-build-core as declared by each package.
|
|
182
|
+
Add OpenSSL, libffi, zlib, other compression headers, BLAS/LAPACK, and Fortran
|
|
183
|
+
compiler/runtime only for recipes that require them.
|
|
184
|
+
- **Wasm builds:** pinned Emscripten, LLVM/LLD, separate WASI sysroot, compatible
|
|
185
|
+
Rust target and the owned CPython extension headers/ABI. Keep Emscripten Python
|
|
186
|
+
side modules distinct from WASI command modules. Begin with reproducible builds
|
|
187
|
+
outside the browser; compiling these tools themselves to browser-compatible
|
|
188
|
+
Wasm is a separately tested capability.
|
|
189
|
+
- **Ollama source builds, if later needed:** derive the Go, C/C++ and build-system
|
|
190
|
+
requirements from the pinned upstream release. Building from source is optional;
|
|
191
|
+
installing its official Linux artifact must work without a compiler.
|
|
192
|
+
|
|
193
|
+
Publish recipes, patches, source hashes and target manifests for these toolchains.
|
|
194
|
+
Prebuilt runtime packs should remain sufficient for normal users; downloading an
|
|
195
|
+
entire compiler stack must not be required merely to load a model.
|
|
196
|
+
|
|
197
|
+
## Distribution and dependency resolution
|
|
198
|
+
|
|
199
|
+
Define a versioned manifest for each pack and the future agent package containing:
|
|
200
|
+
|
|
201
|
+
- Pack ID/version, execution profile, CPU architecture, OS/libc, Python ABI or
|
|
202
|
+
Wasm ABI as applicable, and minimum runtime capabilities.
|
|
203
|
+
- Direct dependencies plus a resolved transitive lock with versions, artifact
|
|
204
|
+
URLs, hashes, installed paths, compressed/expanded sizes and licenses/notices.
|
|
205
|
+
- Required CPU features, RAM/disk estimates, network endpoints, install recipe,
|
|
206
|
+
readiness checks and supported test matrix.
|
|
207
|
+
- Build-only versus runtime dependencies, optional extras and model assets.
|
|
208
|
+
|
|
209
|
+
The agent manifest requests these capabilities; the resolver chooses only packs
|
|
210
|
+
compatible with its declared profile. Use separate Linux and Wasm package stores,
|
|
211
|
+
and never silently switch execution profiles after an installation failure.
|
|
212
|
+
Provide atomic installs, retry/resume, cache reuse, clean uninstall and rollback
|
|
213
|
+
without deleting user models. Browser asset hosting must support the required
|
|
214
|
+
CORS, worker URLs and cross-origin isolation for SharedArrayBuffer-based paths.
|
|
215
|
+
Record third-party distribution obligations, including kernel/rootfs source and
|
|
216
|
+
notice requirements, before publishing packs through the wheels site.
|
|
217
|
+
|
|
218
|
+
## Model responsibility and documented limits
|
|
219
|
+
|
|
220
|
+
The user will supply approximately 120M–200M parameter models; creating and
|
|
221
|
+
uploading them is outside this phase. Validate a compatible small model once one
|
|
222
|
+
is available. Parameter count alone does not establish compatibility: model
|
|
223
|
+
architecture, file format, operators, quantization and runner support also matter.
|
|
224
|
+
|
|
225
|
+
There must be no arbitrary parameter-count block. Let users select models and
|
|
226
|
+
show estimated memory, available resources and measured performance. Billion-
|
|
227
|
+
parameter models are outside the initial validation target and may be impractical
|
|
228
|
+
in the emulated Linux profile; this is not a universal claim that every such model
|
|
229
|
+
cannot run. Even 120M–200M models are not guaranteed to run smoothly until measured.
|
|
230
|
+
Weights alone require roughly parameters × bits-per-weight / 8 bytes, with
|
|
231
|
+
additional memory for the kernel, emulator, runtime, activations, KV cache and
|
|
232
|
+
temporary copies. Resource exhaustion and cancellation must fail cleanly.
|
|
233
|
+
|
|
234
|
+
## Implementation order and acceptance gates
|
|
235
|
+
|
|
236
|
+
1. **Lock the architecture:** select candidate emulator, guest architecture,
|
|
237
|
+
kernel/rootfs and package versions. Inventory the actual binary dependency
|
|
238
|
+
closure. Stop claiming Linux compatibility until the following gates pass.
|
|
239
|
+
2. **Prove the Linux foundation:** boot in a real browser, run dynamically linked
|
|
240
|
+
native programs, exercise processes/threads/mmap, install a distro package and
|
|
241
|
+
preserve files across restart. Verify networking through the declared transport.
|
|
242
|
+
3. **Prove upstream Ollama:** install the official pinned artifact, start its
|
|
243
|
+
server and exercise its API. Separately validate its CPU runner with a small
|
|
244
|
+
compatible model; report memory and performance without making model creation
|
|
245
|
+
part of this phase.
|
|
246
|
+
4. **Prove native Python ML:** install the locked CPU wheels, import torch and
|
|
247
|
+
Transformers, perform tensor operations and run one small supported inference
|
|
248
|
+
task. Test hub downloads, offline cache and process cleanup.
|
|
249
|
+
5. **Prove browser ML independently:** load Transformers.js through the browser
|
|
250
|
+
export, load matching backend assets, and run a small ONNX model. Exercise the
|
|
251
|
+
Wasm path and optional WebGPU path separately.
|
|
252
|
+
6. **Prove toolchains:** compile and run a C/C++ program and Rust program in the
|
|
253
|
+
Linux guest; build/import representative C and Rust Python extensions. Verify
|
|
254
|
+
separate Wasm outputs against the existing runtime ABI.
|
|
255
|
+
7. **Publish dependency packs:** lock transitive artifacts and document browser,
|
|
256
|
+
CPU, memory, storage, networking and package limitations. Test interrupted
|
|
257
|
+
installs, restart, cancellation, version conflicts and missing capabilities.
|
|
258
|
+
|
|
259
|
+
Phase one is complete when these dependency paths are reproducible and their
|
|
260
|
+
tests pass. The later `.sbjs` agent application can then depend on demonstrated
|
|
261
|
+
capabilities instead of assumed Linux command compatibility.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sandboxedjs",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.21",
|
|
4
4
|
"description": "A zero-infra JavaScript and Python sandbox for AI agents and browser IDEs. A lightweight, secure alternative to WebContainers and NodePod for running untrusted code with a full POSIX shell.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -108,6 +108,7 @@
|
|
|
108
108
|
"set-cookie-parser": "^3.1.2",
|
|
109
109
|
"stream-browserify": "^3.0.0",
|
|
110
110
|
"string_decoder": "^1.3.0",
|
|
111
|
+
"sucrase": "^3.35.1",
|
|
111
112
|
"timers-browserify": "^2.0.12",
|
|
112
113
|
"url": "^0.11.4",
|
|
113
114
|
"wa-sqlite": "^1.0.0"
|