Releases: capsulerun/capsule
Release list
v0.8.10
v0.8.9
Improvements
Rust Core
- Fix cache issues for multi-language projects
- Improve task reporter to have better logs
Typescript SDK
- Fix worker process issue for
run()command - Fix absolute path issue for fs polyfills
Python SDK
- Fix worker process issue for
run()command
v0.8.8
Smaller Python bundle, worker mode, and path fixes
Improvements
Core
- Worker mode: Added a
capsule workerto reduce child process overhead when using therun()function. - Trace rebuild fix: Fixed trace rebuild for projects using both Python and TypeScript sandboxes.
SDKs
- Smaller Python bundle: Only import the necessary built-ins, reducing the overall size.
- TypeScript path fixes: Resolved absolute path issues with
fspolyfills.
v0.8.7
Path resolution, polyfills, and large argument support
Note
This release bundles several improvements made since v0.8.0 (versions 0.8.1 to 0.8.6 were internal steps).
Core Improvements
--args-fileoption: Bypass inline argument limits by passing arguments via a file.
capsule run main.ts --args-file /tmp/tmp-file.txt # avoid inline limitWith this improvement, the run() function now handles large inputs more reliably.
- Virtual CWD support :
process.chdir()now works inside the sandbox. Relative paths resolve correctly against the virtual working directory. Useful to have a real CWD system for the--mountoption.
process.chdir('hello-folder') // _virtualCwd = 'hello-folder'
fs.readdirSync('.') // '.' → 'hello-folder' → matches preopen
fs.readFileSync('file.txt') // 'file.txt' → 'hello-folder/file.txt'TypeScript Improvements
Improved compatibility for Node.js built‑ins and made imports more reliable. This makes Capsule work smoothly with alternative package managers like pnpm.
v0.8.0
Richer execution metrics
This release adds more visibility into each task's behavior.
What's New
Core improvements
You now get memory usage and outbound network requests for every task.
Example response:
{
"success": true,
"result": "Hello from Capsule!",
"error": null,
"execution": {
"task_name": "data_processor",
"duration_ms": 1523,
"retries": 0,
"fuel_consumed": 45000,
"ram_used": 1200000,
"host_requests": [{ ... }]
}
}Important
Delete the .capsule cache folder to avoid any issues with trace history.
TS polyfills
- Extended compatibility by adding
unenvto replace Node.js built‑ins that are not WASI related.
v0.7.2
Dynamic Directory Aliases (--mount) & Adapter Sessions
Core Improvements
Added --mount flag (CLI) and mounts parameter (SDK) to mount a host directory into the sandbox under an alias.
# Mount a session workspace and expose it as "workspace" inside the task
capsule run main.py --mount restricted-folder/sessions/abc123_workspace::workspace
# Multiple directories
capsule run main.py \
--mount restricted-folder/sessions/abc123_workspace::workspace \
--mount restricted-folder/sessions/bce456_workspace::workspace:rofrom capsule import run
result = await run(
file="main.py",
mounts=["restricted-folder/sessions/abc123_workspace::workspace"],
)Python & TypeScript Adapter Sessions
A new sandboxed session system is now available.
from capsule_adapter import Session
async with Session() as s:
await s.run("x = 1")
result = await s.run("x += 1; x")
print(result) # 2You can also import files within a session:
async with Session() as s:
# Import a single file
await s.import_file("./notes.txt", "notes.txt")
result = await s.run("""
with open("workspace/notes.txt") as f:
content = f.read()
content
""")
# Delete the file
await s.delete_file("./notes.txt")SDK
Added more built-ins to the TypeScript SDK.
v0.7.1
v0.7.0
Prebuilt Sandbox Adapters & Python Component toolchain Improvements
This release adds prebuilt sandbox adapters for Python and TypeScript, plus improvements to Python's component toolchain.
What's New
TypeScript
Prebuilt Sandbox for Python & JavaScript
The @capsule-run/adapter package offers the same capabilities for TypeScript/JavaScript projects.
import { runPython, runJavaScript } from '@capsule-run/adapter';
const pythonSandbox = await runPython(`
print("Hello from Python!")
x = 5 + 3
x * 2
`);
console.log(pythonSandbox);
const jsSandbox = await runJavaScript(`
console.log("Hello from JavaScript!");
const x = 5 + 3;
x * 2;
`);
console.log(jsSandbox);Install with: npm install @capsule-run/adapter
Learn more: Typescript Adapter documentation
Python
Prebuilt Sandbox for Python & JavaScript
You can now run untrusted Python or JavaScript code directly from your Python application using precompiled sandboxes. The package is available on PyPI:
from capsule_adapter import run_python, run_javascript
python_sandbox = await run_python("""
print("Hello from Python!")
x = 5 + 3
x * 2
""")
print(python_sandbox)
js_sandbox = await run_javascript("""
console.log("Hello from JavaScript!");
let x = 5 + 3;
x * 2;
""")
print(js_sandbox)Install with: pip install capsule-run-adapter
Learn more: Python Adapter documentation
Python Toolchain Upgrades
- Full asyncio Support
The previous POSIX dependency made asyncio difficult to use in WASM. We’ve reimplemented essential selector functionality soasync/awaitnow works as expected.
Enhanced Filesystem Mode — Fine‑Grained Access Control
You can now specify precise filesystem permissions on a per‑path basis, choosing between read‑only or read‑write access.
Typescript
export const main = task({
name: "main",
allowedFiles: [
{ path: "./data", mode: "read-only" },
{ path: "./output", mode: "read-write" },
]
}, async () => {
...
});Python
@task(name="main", allowed_files=[
{"path": "./data", "mode": "read-only"},
{"path": "./output", "mode": "read-write"},
])
def main() -> str:
...Note
The previous version still works but give a read and write permission:
allowed_files=["./data"]allowedFiles:["./data"]
v0.6.5
v0.6.4
Linux universal compatibility
What's new
Linux improvements
- Rebuilt
linux-x64binary as a static MUSL binary — no more GLIBC version requirements, works on Debian Bookworm, Ubuntu 22.04, Alpine, and any Linux distro - Added
linux-arm64support (AWS Graviton, Apple Silicon Docker, Raspberry Pi)