Moving untrusted code into a worker thread isn't sandboxing it.
A worker isolates the event loop, not authority: it still starts with filesystem, network and process access.
If you want a narrower boundary, you have to drop those permissions before the guest code compiles.
Meet sqlite-js-stream: Litestream, rewritten for Node.js in TypeScript
It speaks the same LTX format as Litestream, so the two can read each other's files. Stream your SQLite WAL directly to S3 or local storage, and restore from it.
But the real breakthrough is not just the port. It's how you deliver it. Litestream requires a Go sidecar, its own config, and a separate binary to manage on every deploy. sqlite-js-stream is an npm package that runs inside your Node.js process. No sidecars, no extra moving parts.
That sidecar overhead? It's the main reason SQLite hasn't seen wider adoption in production. Matteo called it, and I agree.
Here's the kicker: the entire port was built by an AI agent running locally on two DGX Sparks, with a human in the loop for planning, review, and final decisions.
If SQLite backups were just one npm install away, would you finally run SQLite in production?