mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
Node 24/26 --watch posts watch:import/watch:require messages on the worker channel (nodejs/node#65044), which failed the run as a broken bridge. closes #10725
3.4 KiB
3.4 KiB
Changelog
[Unreleased]
Added
- Added
RemoteCodemodeSandbox, which runs each script's VM in another isolate while tools run in the caller.CodemodeSandboxDurableObjectfrom the new@earendil-works/pi-codemode/cloudflareentry is its remote end, deployed as its own Cloudflare Worker.examples/cloudflareshows the setup - Added
InlineCodemodeSandbox, which runs the VM on the calling thread for runtimes without worker threads. ItsinterruptBudgetlimits scripts that compute without awaiting a tool - Added the
@earendil-works/pi-codemode/portableentry, which has no Node imports, andCodemodeSandboxBase, the API all three sandboxes share
Changed
- The VM now polls for interrupts while it drains promise jobs, so a script such as
while (true) await nullis stopped at the same points as a synchronous loop
Fixed
- Fixed
CodemodeSandboxfailing with a broken bridge error when the host runs undernode --watchon Node 24 or 26, which postswatch:import/watch:requiremessages on the worker channel (#10725)
[1.1.0] - 2026-10-07
Added
- Added
console: trueto text output items produced byconsole.*, so hosts can tell them apart fromtext()output
[1.0.4] - 2026-10-05
Changed
- Built-ins are frozen and built-in globals are read-only before the script runs, so patches such as
Array.prototype.toJSON = ...have no effect. Instances can still overrideconstructor,name,message,toString,toLocaleString,valueOf,toJSON, andObject.prototypemembers (#10444)
Fixed
- Fixed a script that patched built-ins crashing the host process and leaving
execute()unsettled. Malformed payloads from the worker now fail the execution with asandboxerror (#10444)
[1.0.3] - 2026-10-05
[1.0.2] - 2026-10-04
[1.0.1] - 2026-10-03
Fixed
- Fixed scripts that print in a loop growing the host's memory until it crashes: output is limited to
MAX_OUTPUT_CHARS(16 Mi) characters andMAX_OUTPUT_ITEMS(100000) items, and a script past either limit fails with aRangeError(#10283)
[1.0.0] - 2026-10-01
Added
- Added
renderToolOutputType(), the type a tool call resolves to.
Changed
- Reading a member of
toolsor of a global namespace that does not exist now throws an error naming the close matches, instead of returningundefined. Use"name" in toolsto check for a tool.store()size errors explain what the store is for.
[0.99.2] - 2026-09-30
Changed
- Allowed
CodemodeSandbox.workerUrlto be a string, as required for embedded worker entrypoints in Bun compiled executables (#10204).
Fixed
- Fixed
image()accepting malformed base64 data and unsupported image types. It now throws aTypeErrorunless the data is valid base64 of a PNG, JPEG, GIF, or WebP image, derives the MIME type from the image signature instead of the declared type, and strips line breaks from wrapped base64 (#10215).
[0.99.1] - 2026-09-29
[0.99.0] - 2026-09-29
Added
- Initial spike:
CodemodeSandboxruns model-written JavaScript in a worker thread and exposes injected tools astools.<name>(args)async functions.