NormalScript runs agent code in a small JavaScript VM for Node and Bun
The website psychoscript.com presents NormalScript, a small virtual machine for a subset of JavaScript that embeds in a Node or Bun application. The host app hands it a few functions, and it runs little scripts and agent "code mode", where an agent, user or plugin writes one script that chains many host calls, with loops, branches and Promise.all in between. Errors come back with a kind, a message and optional suggestions. The site calls the machine fast.
It ships as a pure JavaScript package for Node 24 or later, or Bun 1.4 or later, with no WASM module, native addon, isolate or worker to wire up. Scripts compile to bytecode and run inside the host process. A developer calls Runtime.make with a globals function and optional limits, then runs a script with runtime.execute(code). A run stops on timeoutMs or an AbortSignal. Arguments reach the host as copies, and results are copied back.
A waiting run can be paused with program.suspend(), saved with toBytes() and continued with fromBytes() and runtime.resume(), provided the build and globals are the same. One example on the page filters a three-invoice ledger, sends reminders for the unpaid ones and returns 2 reminded and 530 owed. Another pauses a loop of host calls mid-call, saves it as bytes and resumes it to a result of 60.
Scripts use a modern strict-mode subset of JavaScript with async functions, generators, classes, and top-level await and return. This is not a full runtime like Node, Bun or a browser: fetch, fs, process and the DOM are not provided, and anything external must be passed in as a host function. The omissions also cover timers, eval, Proxy, Reflect, #private members, ArrayBuffer and TypeScript syntax.
The page reports 19,408 test262 files passing, 2,845 skipped as known gaps and 0 failing. It also carries deadpan corporate wording: "Nothing unusual happens here", a claim of trust from more than 400 "normal organizations", and a "Declaration of Normal Viewing" form for visitors to sign.
Key facts
- NormalScript is an MIT-licensed bytecode virtual machine for a JavaScript subset, packaged in pure JavaScript for Node 24+ or Bun 1.4+.
- In code mode, one script chains many host calls with loops, branches and Promise.all, using only what the host app passes in.
- A waiting run can be suspended, saved as bytes and resumed later with the same build and globals.
- The page reports 19,408 test262 files passing, 2,845 skipped as known gaps and 0 failing.
- It is not a full runtime: there is no fetch, fs, process, DOM, timers, eval or TypeScript syntax.
Why it matters
NormalScript targets a specific job: letting an agent, user or plugin write one script that makes many host calls, and running it inside an existing Node or Bun process. According to the site, there is no second runtime to operate, no worker to spawn and nothing to boot. The other notable feature is durability. A waiting run can be turned into bytes and picked up later, and Host.durableFn keeps long work running across a suspend.
Who it affects
The site aims it at teams that run little scripts, plugins, lightweight workflows or agent code mode inside a Node or Bun application without operating a second runtime. Those teams need Node 24 or later, or Bun 1.4 or later. Script authors work within a strict-mode subset of JavaScript and reach outside capabilities only through functions the host provides.
How to use it
Call Runtime.make with a globals function and optional limits such as timeoutMs, then run code with runtime.execute(code). Host.fn turns an ordinary function into a global, plain objects of host functions act as namespaces, and Host.namespace resolves large catalogs lazily. StreamingResponse streams a response body. To pause and resume, use program.suspend(), toBytes(), fromBytes() and runtime.resume(). The host API is Promise-based, with the same names over Effect at /effect.
NormalScript is distributed under the MIT License. The page links to GitHub and suggests starting an evaluation by requesting a demo or downloading a white paper.
How solid is it
The source is the product's own website, and its descriptions are self-reported. It gives concrete code examples and test262 counts: 19,408 files passing, 2,845 skipped and 0 failing. Those figures count files, and the page gives no overall percentage of the JavaScript specification covered. No benchmarks back the word "fast". The more than 400 organizations said to trust it are not named, and no evidence for the number is offered. No author or company behind the project is named, and no version number or release date is given.
Risks and caveats
The tone calls for care. Lines such as "Nothing unusual happens here" and a form in which the signer declares "I did not take the tab" sit beside the technical material, and the page does not say whether any of it is a joke or explain it. Naming is also unexplained: the domain is psychoscript.com and the scope matrix mentions a psychoscript/effect adapter, while the code examples import from "normalscript".
The page text states no security or sandboxing guarantee. Functionally, scripts exit at the end of their body and interrupt pending work that was not awaited. import and require only bind host globals, and passing guest callbacks to host functions is described as planned.
“It embeds in your Node or Bun application: give it a few host functions and it runs little scripts and agent code mode, pausing to bytes and resuming later.”
— NormalScript website