unstale

npm / @earendil-works/pi-codemode

@earendil-works/pi-codemode

What changed in @earendil-works/pi-codemode 0.99 to 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-11.

9 breaking1 security20 new APIs and options4 behavior and defaults6 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

@earendil-works/pi-codemode 136 changes

Breaking changes 8

  • Worker-backed results and close now settle after requesting shutdown rather than waiting for worker exit; hosts needing actual exit must track onWorkerStarted(exited) or retain capacity through acquireWorker()'s release callback.

    1.3.0release notes

  • Removed this export.

    1.2.0release notes

  • Removed this API.

    1.2.0release notes

  • No longer ignores a // @options: line that is not first; it now throws CodemodeSourceError instead of silently missing its timeout_ms.

    1.2.0release notes

  • Renders every output schema as its own type and no longer turns MCP CallToolResult schemas into CallToolResult<T>; describe MCP results in the output schema instead.

    1.2.0release notes

  • Built-ins are frozen and built-in globals are read-only before scripts run; patches to built-ins have no effect, while specified instance overrides remain possible.

    1.0.4release notes

  • Script output is limited to MAX_OUTPUT_CHARS (16 Mi) characters and MAX_OUTPUT_ITEMS (100000) items; exceeding either limit fails with a RangeError.

    1.0.1release notes

  • Reading a nonexistent member of tools or a global namespace now throws an error naming close matches instead of returning undefined; check for a tool with "name" in tools.

    1.0.0release notes

Security 1

  • Scripts that patch built-ins no longer crash the host or leave execute() unsettled; malformed worker payloads now fail execution with a sandbox error.

    1.0.4release notes

New APIs and options 18

  • Added a helper that resolves a local $ref to its subschema, including URI-decoded and JSON Pointer unescaped segments.

    1.5.1release notes

  • CodemodeSandbox adds an acquireWorker() hook to reserve shared capacity before starting a worker and release it only on actual exit or constructor failure.

    1.3.0release notes

  • CodemodeSandbox adds an onWorkerStarted(exited) callback so hosts can count a worker against concurrency limits until it actually exits, independently of its script result.

    1.3.0release notes

  • Provides the API shared by all three sandboxes.

    1.2.0release notes

  • Adds a Cloudflare entry whose CodemodeSandboxDurableObject is the remote end for RemoteCodemodeSandbox, deployed as its own Cloudflare Worker.

    1.2.0release notes

  • Adds an entry with no Node imports.

    1.2.0release notes

  • Runs the VM on the calling thread for runtimes without worker threads.

    1.2.0release notes

  • Limits scripts that compute without awaiting a tool in InlineCodemodeSandbox.

    1.2.0release notes

  • Provides a host callback for calls made during a deterministic sandbox.start() run.

    1.2.0release notes

  • Reports the calls issued after each result during a deterministic run.

    1.2.0release notes

  • Provides the VM's fingerprint during a deterministic run.

    1.2.0release notes

  • Runs each script's VM in another isolate while tools run in the caller.

    1.2.0release notes

  • Lets the host deliver results during a deterministic sandbox.start() run.

    1.2.0release notes

  • Indicates whether a deterministic run has its outcome.

    1.2.0release notes

  • Adds deterministic runs whose calls the host answers itself, allowing a host to replay a script after a restart; execute() is unchanged.

    1.2.0release notes

  • Sets randomness for deterministic runs.

    1.2.0release notes

  • Sets the virtual clock for deterministic runs.

    1.2.0release notes

  • Added the type a tool call resolves to.

    1.0.0release notes

Behavior and default changes 3

  • Shows property constraints that TypeScript cannot express as tags on the property's comment line; retries rendering without tags before rendering an oversized type as unknown.

    1.2.0release notes

  • The VM polls for interrupts while draining promise jobs, stopping scripts such as while (true) await null at the same points as a synchronous loop.

    1.2.0release notes

  • Text output items produced by console.* now include console: true, allowing hosts to distinguish them from text() output.

    1.1.0release notes

Fixes and other changes 6

  • Console output and thrown non-Error values in scripts now print NaN, Infinity, and -Infinity as text() does, rather than as null.

    1.5.1release notes

  • Malformed percent escapes in local references no longer throw while rendering schemas, declarations, tool signatures, or samples; the reference renders as unknown.

    1.5.1release notes

  • On Bun, aborts, timeouts, and close no longer wait for worker termination while a non-interruptible built-in runs; shutdown requests termination without waiting for exit.

    1.3.0release notes

  • Fixes a broken bridge error when the host runs under node --watch on Node 24 or 26, which posts watch:import/watch:require messages on the worker channel.

    1.2.0release notes

  • Errors describe the accepted image block as { type: "image", data, mimeType } instead of an MCP image block.

    1.2.0release notes

  • Store size errors now explain what the store is for.

    1.0.0release notes

@earendil-works/pi-codemode 0.994 changes

Breaking changes 1

  • image() rejects malformed base64 and unsupported image types, derives MIME type from the image signature, and strips line breaks from wrapped base64.

    0.99.2release notes

New APIs and options 2

  • Introduces CodemodeSandbox, which runs model-written JavaScript in a worker thread and exposes injected tools as async functions.

    0.99.0release notes

  • Injected tools are exposed to model-written JavaScript as async functions called with args.

    0.99.0release notes

Behavior and default changes 1

  • CodemodeSandbox.workerUrl now accepts a string, enabling embedded worker entrypoints in Bun compiled executables.

    0.99.2release notes