sandboxedjs 0.2.21 → 0.2.23
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/agent.cjs +20 -14
- package/dist/agent.d.cts +4 -4
- package/dist/agent.d.ts +4 -4
- package/dist/agent.js +20 -14
- package/dist/{container-D-e5SMXQ.d.ts → container-CPwPlvmB.d.cts} +9 -1
- package/dist/{container-BQx27_d-.d.cts → container-DZabLWLy.d.ts} +9 -1
- package/dist/{contracts-BHo4LdY2.d.cts → contracts-BFG82pSs.d.cts} +40 -2
- package/dist/{contracts-BHo4LdY2.d.ts → contracts-BFG82pSs.d.ts} +40 -2
- package/dist/index.cjs +1033 -783
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +1033 -783
- package/dist/{memory-volume-meoRW8ST.d.ts → memory-volume-DhGUwDqX.d.ts} +1 -1
- package/dist/{memory-volume-e-uJFRnG.d.cts → memory-volume-Din7xmmT.d.cts} +1 -1
- package/dist/python-abi.d.cts +3 -3
- package/dist/python-abi.d.ts +3 -3
- package/dist/worker-entry.js +24296 -2666
- package/docs/nextjs-compatibility.md +17 -0
- package/docs/to_implement/agent.md +178 -44
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Next.js capability probe
|
|
2
|
+
|
|
3
|
+
Run `node examples/nextjs-probe.mjs` against a local build. It installs Next 16.3.8,
|
|
4
|
+
React 19.2 and requests a genuine App Router page. Successful CLI startup alone is
|
|
5
|
+
not sufficient: HTTP 200 and the rendered marker are required.
|
|
6
|
+
|
|
7
|
+
Observed on 2026-10-04: package installation succeeds and the CLI prints its startup
|
|
8
|
+
banner, but initialization fails with an undefined `typescript` property during
|
|
9
|
+
dev-bundler setup. The probe therefore exits unsuccessfully. Full Next.js support
|
|
10
|
+
is **not verified**. Do not publish a support claim or relabel a Vite app as Next.js.
|
|
11
|
+
|
|
12
|
+
For an interactive course, keep the real Next.js application as the download and
|
|
13
|
+
use a separately labeled Vite adapter importing the same React components for the
|
|
14
|
+
browser preview. Keep FastAPI and API contracts unchanged. Next-specific routing,
|
|
15
|
+
server components and builds still need a native Node environment until verified.
|
|
16
|
+
|
|
17
|
+
The probe is diagnostic only; no npm version bump or publication is included.
|
|
@@ -1,17 +1,151 @@
|
|
|
1
|
-
# Agent
|
|
1
|
+
# Agent support — running other people's agents on SandboxedJs
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> Status: **plan**. Nothing here claims existing support unless it links to code.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## 1. What this is, and is not
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
SandboxedJs is a Linux alternative for the browser. It does not ship an agent,
|
|
8
|
+
a model adapter, a prompt, or an API key. The goal of this plan is that agents
|
|
9
|
+
which already exist — Claude Code, Codex, Gemini CLI, opencode, Aider, and
|
|
10
|
+
local model servers such as Ollama — **install and run inside a container the
|
|
11
|
+
way they do on a Linux machine**, and that frameworks which drive a sandbox
|
|
12
|
+
from outside (Deep Agents and the like) find a complete one.
|
|
8
13
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
An agent brings its own model, its own credentials and its own loop. What it
|
|
15
|
+
needs from us is an operating system: a place to install, a terminal, a
|
|
16
|
+
filesystem, processes, a network, and somewhere to keep a login.
|
|
17
|
+
|
|
18
|
+
Not in scope: an agent loop, provider adapters, a model router, context
|
|
19
|
+
management, prompts, evals. An earlier draft of this document planned those;
|
|
20
|
+
they belong to the agents.
|
|
21
|
+
|
|
22
|
+
## 2. What the agents actually are (npm metadata, 2026-10-02)
|
|
23
|
+
|
|
24
|
+
How each one is distributed decides which of our runtimes has to carry it.
|
|
25
|
+
|
|
26
|
+
| Agent | Package | What is in it | Runs on |
|
|
27
|
+
| --- | --- | --- | --- |
|
|
28
|
+
| Claude Code | `@anthropic-ai/claude-code` 2.1.287 | a native executable per platform (`linux-x64`, `linux-arm64`, musl variants), selected through `optionalDependencies` | native Linux binaries (§4) |
|
|
29
|
+
| Codex | `@openai/codex` 0.160.0 | a small JS launcher plus a native executable per platform | native Linux binaries (§4) |
|
|
30
|
+
| opencode | `opencode-ai` 1.18.34 | a native executable per platform | native Linux binaries (§4) |
|
|
31
|
+
| Gemini CLI | `@google/gemini-cli` 0.62.0 | a JavaScript bundle (98 MB unpacked), Node ≥ 20, optional `node-pty` and keytar | the Node runtime (§3) |
|
|
32
|
+
| Aider and other Python agents | PyPI | Python, with compiled dependencies | the Python runtime (§3) |
|
|
33
|
+
| Ollama | upstream Linux release | Go and C++ executables | native Linux binaries (§4) |
|
|
34
|
+
|
|
35
|
+
The consequence is the centre of this plan: **three of the four coding agents,
|
|
36
|
+
and Ollama, are Linux executables.** Our Node and Python runtimes cannot run
|
|
37
|
+
them however complete they become. Supporting them means executing unmodified
|
|
38
|
+
Linux binaries, which is the Linux-guest work in Appendix D — until now filed
|
|
39
|
+
as a side workstream for local models.
|
|
40
|
+
|
|
41
|
+
This table is from package metadata only. Nothing in it has been installed or
|
|
42
|
+
run in a container yet; doing that is M0.
|
|
43
|
+
|
|
44
|
+
## 3. Track A — agents written in JavaScript or Python
|
|
45
|
+
|
|
46
|
+
These run on the runtimes that exist today, to the extent those runtimes are
|
|
47
|
+
complete. Expected gaps, to be confirmed by running them (M0):
|
|
48
|
+
|
|
49
|
+
- **Node version and API surface.** Gemini CLI requires Node ≥ 20; the
|
|
50
|
+
container must report and behave as a version it accepts, including the
|
|
51
|
+
ESM, `fetch`, streams, `worker_threads` and `child_process` behaviour a
|
|
52
|
+
98 MB bundle exercises.
|
|
53
|
+
- **A real terminal.** Agent CLIs are full-screen TUIs: raw mode, cursor
|
|
54
|
+
addressing, resize, bracketed paste, colour detection. `src/container/terminal.ts`
|
|
55
|
+
and the tty line discipline have to carry that.
|
|
56
|
+
- **Pseudo-terminals.** `node-pty` is a native addon. It needs an in-kernel pty
|
|
57
|
+
and a shim that answers the addon's interface, or the agent falls back to
|
|
58
|
+
plain pipes where it can.
|
|
59
|
+
- **Credential storage.** keytar and its equivalents are native too; the
|
|
60
|
+
fallback is files under the home directory, which must persist (below).
|
|
61
|
+
- **Streaming HTTP out.** Server-sent events and long-lived responses through
|
|
62
|
+
the egress path, including through the proxy a browser needs for hosts that
|
|
63
|
+
send no CORS headers.
|
|
64
|
+
- **Install size and time.** `npm install -g` of a package this large, in a
|
|
65
|
+
tab, with a persistent store so it happens once.
|
|
66
|
+
|
|
67
|
+
## 4. Track B — agents that are Linux executables
|
|
68
|
+
|
|
69
|
+
Claude Code, Codex, opencode and Ollama. Two ways to run them, and the first
|
|
70
|
+
has to be measured before the second is considered:
|
|
71
|
+
|
|
72
|
+
1. **The Linux guest of Appendix D**: a CPU emulator compiled to Wasm, a real
|
|
73
|
+
kernel and a glibc root filesystem. Unmodified binaries run because it is
|
|
74
|
+
Linux. Costs: download size, memory, speed, and a network bridge (a browser
|
|
75
|
+
has no raw sockets, so TLS from inside the guest needs a relay).
|
|
76
|
+
2. **Extending our own ELF execution** (`src/native`, `docs/original-x64.md`)
|
|
77
|
+
to dynamic linking and a Linux syscall surface. Today it handles a small
|
|
78
|
+
freestanding subset. This is a far larger project and is not proposed
|
|
79
|
+
unless the guest proves unusable.
|
|
80
|
+
|
|
81
|
+
What the guest must provide for an agent specifically, beyond Appendix D:
|
|
82
|
+
|
|
83
|
+
- A terminal bridged to the page's terminal, with resize.
|
|
84
|
+
- The container's files visible to the guest, so the agent edits the same
|
|
85
|
+
project the rest of SandboxedJs sees. Appendix D keeps the disks separate
|
|
86
|
+
with explicit transfer; an agent needs a shared mount, and that design is
|
|
87
|
+
open (§8).
|
|
88
|
+
- Outbound HTTPS to the agent's provider under the container's egress policy.
|
|
89
|
+
- Its login persisted across reloads.
|
|
90
|
+
|
|
91
|
+
## 5. What every agent needs from the OS
|
|
92
|
+
|
|
93
|
+
Mechanisms, each useful without an agent and each tested without one:
|
|
94
|
+
|
|
95
|
+
| Need | State |
|
|
96
|
+
| --- | --- |
|
|
97
|
+
| Sealed secrets: a credential a process can use and cannot read | first version in `src/net/secrets.ts` (`network.secrets`), for guest `fetch`/`http`/`https`; not yet `curl`, Python sockets or the Linux guest |
|
|
98
|
+
| Outbound policy, proxy for CORS, streaming | `src/net/policy.ts`, `sandboxedjs-egress`; streaming through the proxy unverified |
|
|
99
|
+
| Persistent home directory (logins, config, session history) | to do: which volume, and what survives a reload |
|
|
100
|
+
| Login flows: OAuth in a browser window, device codes, a localhost callback inside the container | to do; the callback needs the preview router to accept an external redirect |
|
|
101
|
+
| Snapshots and undo of the filesystem | to do; lets a host offer "undo what the agent did" for any agent |
|
|
102
|
+
| Per-process limits on files, hosts and commands | to do; the same for every agent, enforced by the kernel rather than by each agent's own permission prompts |
|
|
103
|
+
| Playwright without Chromium, for agents that test web apps | `src/browser/*`, `vireo`; see `docs/virtual-browser.md` |
|
|
104
|
+
| MCP servers from npm and PyPI as container processes | should follow from the Node and Python runtimes; unverified |
|
|
105
|
+
| Driving the container from outside | `src/agent/backend.ts` implements Deep Agents' `SandboxBackendProtocolV2`; exposing the container as an MCP server is to do |
|
|
106
|
+
|
|
107
|
+
## 6. Milestones
|
|
108
|
+
|
|
109
|
+
| M | Scope | Done when |
|
|
110
|
+
| --- | --- | --- |
|
|
111
|
+
| M0 | Install and start each agent in §2 in a container, in Node and in a browser. Record exactly where each stops. | A compatibility report in `docs/agent/` replaces the guesses in §3 and §4 |
|
|
112
|
+
| M1 | Track A: Gemini CLI runs a real task end to end, with the user's own key | `gemini` edits a file and runs a command, in Node and in a tab |
|
|
113
|
+
| M2 | OS needs of §5: persistent home, login flows, sealed secrets on every exit | An agent stays logged in across a reload, with its key sealed |
|
|
114
|
+
| M3 | Linux guest foundation (Appendix D, steps 1–2) | A dynamically linked Linux program runs in a tab |
|
|
115
|
+
| M4 | Track B: Claude Code and Codex in the guest, on the container's files | Each completes a task in a tab |
|
|
116
|
+
| M5 | Ollama in the guest (Appendix D, step 3), reachable by agents in the container on port 11434 | A Track A agent uses a guest-hosted model with no network |
|
|
117
|
+
| M6 | Snapshots and per-process limits | A host undoes an agent's changes and confines it, for any agent |
|
|
118
|
+
|
|
119
|
+
M0 comes first because every later row rests on assumptions it tests.
|
|
120
|
+
|
|
121
|
+
## 7. Risks
|
|
122
|
+
|
|
123
|
+
| Risk | Mitigation |
|
|
124
|
+
| --- | --- |
|
|
125
|
+
| An emulated Linux guest is too slow or too large for an interactive agent | Measure in M3 before building M4 on it |
|
|
126
|
+
| Agents change packaging between releases (Claude Code moved from JavaScript to native) | Pin and test named versions; publish the compatibility report per version |
|
|
127
|
+
| Providers refuse browser origins | The egress proxy; document it as a requirement, not an option, where it is one |
|
|
128
|
+
| A vendor's terms restrict where its agent may run | Check each before publishing a claim of support |
|
|
129
|
+
|
|
130
|
+
## 8. Open questions
|
|
131
|
+
|
|
132
|
+
1. How the guest sees the container's files: a shared mount (9p or similar)
|
|
133
|
+
or synchronisation, and who owns consistency.
|
|
134
|
+
2. Whether a pty belongs in the kernel now, for Track A, or arrives with the guest.
|
|
135
|
+
3. Which storage backs a persistent home in a tab, and its size limits.
|
|
136
|
+
4. Which agent and version is the first target for M1 and M4.
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
### Appendix D — Local-model runtime dependencies (original phase one, kept)
|
|
141
|
+
|
|
142
|
+
#### Objective and scope
|
|
143
|
+
|
|
144
|
+
Provide the runtime dependencies that agents and local model runtimes need, and
|
|
145
|
+
the transitive dependencies needed to install and execute them. SandboxedJs
|
|
146
|
+
provides the execution environment, dependency resolver, and optional runtime
|
|
147
|
+
packs. Model creation, training, publication, and writing an agent are not part
|
|
148
|
+
of this project. This section is an implementation plan, not a claim of existing
|
|
15
149
|
package support.
|
|
16
150
|
|
|
17
151
|
Required targets:
|
|
@@ -25,7 +159,7 @@ Required targets:
|
|
|
25
159
|
extending package coverage. Ownership means pinned upstream tools, build recipes,
|
|
26
160
|
patches, and release artifacts; it does not require inventing a compiler.
|
|
27
161
|
|
|
28
|
-
|
|
162
|
+
#### Execution architecture: prerequisite before package installation
|
|
29
163
|
|
|
30
164
|
The current POSIX command layer, CPython-to-Wasm runtime, WASI host, and ELF
|
|
31
165
|
dispatch hooks are useful foundations. They do not execute arbitrary Linux
|
|
@@ -36,10 +170,10 @@ Linux Python interpreter, or PyTorch. See [browser architecture](../browser-runt
|
|
|
36
170
|
|
|
37
171
|
Use two explicit execution profiles:
|
|
38
172
|
|
|
39
|
-
| Profile
|
|
40
|
-
|
|
|
41
|
-
| Browser/Wasm | Existing JS runtime, owned Wasm CPython, compatible WASI tools
|
|
42
|
-
| Linux guest
|
|
173
|
+
| Profile | Runtime | Package ABI | Initial purpose |
|
|
174
|
+
| ------------ | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
175
|
+
| 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 |
|
|
176
|
+
| 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
177
|
|
|
44
178
|
For the Linux profile, select a **64-bit architecture supported by the exact
|
|
45
179
|
Ollama and PyTorch releases**. Start by evaluating x86-64 with a glibc-based Debian
|
|
@@ -56,23 +190,23 @@ an upstream Linux ELF binary execute in the existing Wasm runtime. Extending the
|
|
|
56
190
|
original translator to that level is a substantial alternative engineering
|
|
57
191
|
project, not a missing dependency that can simply be installed.
|
|
58
192
|
|
|
59
|
-
|
|
193
|
+
#### Dependency packs and their dependencies
|
|
60
194
|
|
|
61
195
|
Pack names below are proposed distribution units, not existing npm packages.
|
|
62
196
|
Heavy assets should download on demand rather than become unconditional npm
|
|
63
197
|
dependencies of `sandboxedjs`.
|
|
64
198
|
|
|
65
|
-
| Pack
|
|
66
|
-
|
|
|
67
|
-
| `
|
|
68
|
-
| `browser-ml`
|
|
69
|
-
| `linux-machine`
|
|
70
|
-
| `linux-base`
|
|
71
|
-
| `linux-downloads`
|
|
72
|
-
| `linux-python-ml`
|
|
73
|
-
| `linux-ollama`
|
|
74
|
-
| `linux-build-tools` | Native C/C++ compiler, linker, Rust toolchain and build drivers
|
|
75
|
-
| `wasm-build-sdk`
|
|
199
|
+
| Pack | Direct contents | Dependencies and required capabilities |
|
|
200
|
+
| ------------------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
201
|
+
| `pack-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 |
|
|
202
|
+
| `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 |
|
|
203
|
+
| `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 |
|
|
204
|
+
| `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 |
|
|
205
|
+
| `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 |
|
|
206
|
+
| `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 |
|
|
207
|
+
| `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 |
|
|
208
|
+
| `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 |
|
|
209
|
+
| `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
210
|
|
|
77
211
|
Transformers.js uses ONNX Runtime in the browser; provide the assets matching the
|
|
78
212
|
locked package release and resolve browser exports instead of accidentally loading
|
|
@@ -80,7 +214,7 @@ native Node addons. WebGPU is optional for this path and does not accelerate the
|
|
|
80
214
|
Linux guest automatically. [Upstream Transformers.js documentation](https://huggingface.co/docs/transformers.js/en/index)
|
|
81
215
|
and [asset configuration](https://huggingface.co/docs/transformers.js/custom_usage).
|
|
82
216
|
|
|
83
|
-
|
|
217
|
+
#### Linux facilities required underneath the packages
|
|
84
218
|
|
|
85
219
|
The Linux machine must supply more than command names:
|
|
86
220
|
|
|
@@ -111,7 +245,7 @@ Document this infrastructure dependency. Offline operation is possible after
|
|
|
111
245
|
required packages and models are cached; arbitrary live registry access cannot be
|
|
112
246
|
promised on a static host alone.
|
|
113
247
|
|
|
114
|
-
|
|
248
|
+
#### Python and scientific/ML dependency closure
|
|
115
249
|
|
|
116
250
|
Use native Python inside the Linux guest for the initial full Transformers/PyTorch
|
|
117
251
|
target. Choose the Python version together with the available CPU wheels, rather
|
|
@@ -119,13 +253,13 @@ than inheriting the Wasm interpreter version automatically. Resolve the exact
|
|
|
119
253
|
dependency tree from the selected releases and extras; the following is the
|
|
120
254
|
coverage inventory, not a substitute for a lockfile:
|
|
121
255
|
|
|
122
|
-
| Layer
|
|
123
|
-
|
|
|
124
|
-
| Transformers
|
|
125
|
-
| PyTorch CPU
|
|
126
|
-
| Model-dependent extras
|
|
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
|
|
256
|
+
| Layer | Dependencies to resolve and test |
|
|
257
|
+
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
258
|
+
| Transformers | `transformers`, `huggingface-hub`, `tokenizers`, `safetensors`, NumPy, packaging, filelock, PyYAML, regex, tqdm, and the network/filesystem dependencies declared by the selected versions |
|
|
259
|
+
| 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 |
|
|
260
|
+
| Model-dependent extras | SentencePiece/protobuf, Pillow, audio libraries, torchvision/torchaudio, or other processors only when required by the supported model and task |
|
|
261
|
+
| Additional science coverage | NumPy first; SciPy, pandas and scikit-learn as separately validated additions, with matching BLAS/LAPACK, OpenMP and Fortran runtimes where required |
|
|
262
|
+
| Download/cache stack | The selected hub client's HTTP/TLS and filesystem packages, cache locks, resumable downloads, credentials and offline-cache behavior |
|
|
129
263
|
|
|
130
264
|
Rust-based `tokenizers` and `safetensors`, C/C++ extensions, and PyTorch's native
|
|
131
265
|
libraries are transitive runtime artifacts even when a user only installs a
|
|
@@ -142,7 +276,7 @@ PyTorch Wasm port is separate work and is not implied by providing Clang or Rust
|
|
|
142
276
|
See the [owned Python architecture](../python/architecture.md) and
|
|
143
277
|
`python-runtime/abi/extension-abi.json` for the current ABI contract.
|
|
144
278
|
|
|
145
|
-
|
|
279
|
+
#### Real Linux Ollama installation contract
|
|
146
280
|
|
|
147
281
|
Download a pinned upstream archive for the selected guest architecture, verify
|
|
148
282
|
its recorded digest, and install its binary **and required bundled libraries and
|
|
@@ -163,7 +297,7 @@ Linux processes, with backend and version reported to the user. Browser WebGPU
|
|
|
163
297
|
does not provide CUDA or ROCm to these processes; CPU execution is the first
|
|
164
298
|
target. GPU passthrough/translation is outside this phase.
|
|
165
299
|
|
|
166
|
-
|
|
300
|
+
#### Owned compiler and build dependencies
|
|
167
301
|
|
|
168
302
|
Separate the machine **running a compiler** from the architecture it **produces**.
|
|
169
303
|
A Linux `clang` executable needs the Linux guest; emitting Wasm does not make the
|
|
@@ -194,9 +328,9 @@ Publish recipes, patches, source hashes and target manifests for these toolchain
|
|
|
194
328
|
Prebuilt runtime packs should remain sufficient for normal users; downloading an
|
|
195
329
|
entire compiler stack must not be required merely to load a model.
|
|
196
330
|
|
|
197
|
-
|
|
331
|
+
#### Distribution and dependency resolution
|
|
198
332
|
|
|
199
|
-
Define a versioned manifest for each pack
|
|
333
|
+
Define a versioned manifest for each pack containing:
|
|
200
334
|
|
|
201
335
|
- Pack ID/version, execution profile, CPU architecture, OS/libc, Python ABI or
|
|
202
336
|
Wasm ABI as applicable, and minimum runtime capabilities.
|
|
@@ -206,7 +340,7 @@ Define a versioned manifest for each pack and the future agent package containin
|
|
|
206
340
|
readiness checks and supported test matrix.
|
|
207
341
|
- Build-only versus runtime dependencies, optional extras and model assets.
|
|
208
342
|
|
|
209
|
-
|
|
343
|
+
A program's manifest requests these capabilities; the resolver chooses only packs
|
|
210
344
|
compatible with its declared profile. Use separate Linux and Wasm package stores,
|
|
211
345
|
and never silently switch execution profiles after an installation failure.
|
|
212
346
|
Provide atomic installs, retry/resume, cache reuse, clean uninstall and rollback
|
|
@@ -215,7 +349,7 @@ CORS, worker URLs and cross-origin isolation for SharedArrayBuffer-based paths.
|
|
|
215
349
|
Record third-party distribution obligations, including kernel/rootfs source and
|
|
216
350
|
notice requirements, before publishing packs through the wheels site.
|
|
217
351
|
|
|
218
|
-
|
|
352
|
+
#### Model responsibility and documented limits
|
|
219
353
|
|
|
220
354
|
The user will supply approximately 120M–200M parameter models; creating and
|
|
221
355
|
uploading them is outside this phase. Validate a compatible small model once one
|
|
@@ -231,7 +365,7 @@ Weights alone require roughly parameters × bits-per-weight / 8 bytes, with
|
|
|
231
365
|
additional memory for the kernel, emulator, runtime, activations, KV cache and
|
|
232
366
|
temporary copies. Resource exhaustion and cancellation must fail cleanly.
|
|
233
367
|
|
|
234
|
-
|
|
368
|
+
#### Implementation order and acceptance gates
|
|
235
369
|
|
|
236
370
|
1. **Lock the architecture:** select candidate emulator, guest architecture,
|
|
237
371
|
kernel/rootfs and package versions. Inventory the actual binary dependency
|
|
@@ -257,5 +391,5 @@ temporary copies. Resource exhaustion and cancellation must fail cleanly.
|
|
|
257
391
|
installs, restart, cancellation, version conflicts and missing capabilities.
|
|
258
392
|
|
|
259
393
|
Phase one is complete when these dependency paths are reproducible and their
|
|
260
|
-
tests pass.
|
|
394
|
+
tests pass. Agents and model servers can then depend on demonstrated
|
|
261
395
|
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.23",
|
|
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",
|