pi-mono/packages/codemode/CHANGELOG.md
Armin Ronacher 6f1072cc08 feat(coding-agent): shrink codemode prompt and guide scripts back from errors
Move the codemode script reference, including the models API, into
docs/codemode.md and keep only one line per global in the tool
description. Declared tools get a one-line note on how scripts call them,
and the codemode system prompt guidance and MCP server section are shorter.
With the default tools a GPT-5.6 request drops from about 5,300 to 3,300
tokens.

Errors now point the way back: unknown tools and models members name close
matches, models.classify() and models.generateImages() validate their
arguments, unknown or mistyped models point to getAvailableOfType(),
store() overflow explains the store, and unshown generated images get a note.
2026-10-01 18:27:23 +02:00

1.2 KiB

Changelog

[Unreleased]

Added

  • Added renderToolOutputType(), the type a tool call resolves to.

Changed

  • Reading a member of tools or of a global namespace that does not exist now throws an error naming the close matches, instead of returning undefined. Use "name" in tools to check for a tool. store() size errors explain what the store is for.

[0.99.2] - 2026-09-30

Changed

  • Allowed CodemodeSandbox.workerUrl to 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 a TypeError unless 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: CodemodeSandbox runs model-written JavaScript in a worker thread and exposes injected tools as tools.<name>(args) async functions.