Repository navigation
v0.10.1 — image handling fixes and clearer upload guidance
Follow-ups from verifying 0.10.0 against production, and from watching an agent
actually try to use it.
Fixed
get_page include_imagescould return an HTML page as an image. A deleted
or dangling/api/uploads/reference does not 404 — the app's catch-all answers
200 text/html— soresponse.okwas true and a 22 KB HTML page was base64'd
into the model's context undermimeType: text/html. The content type is now
checked: anything that isn'timage/*is skipped and explained in
image_notes. This matters more since 0.10.0 shipped a delete endpoint, which
makes dangling references routine rather than rare.datanow accepts adata:image/png;base64,...URI, not only bare base64.
Agents reach for the URI form naturally; previously the whole string was decoded,
produced garbage, and failed with a misleading "unsupported format" error. That
error message now also names the likely causes.- Dropped
absolute_urlfrom the upload result. On the remote surface
client.baseUrlis a synthetic self-base that nothing dials, so the field
rendered ashttp://127.0.0.1:3000/...— a URL an agent would follow and fail
on. The relativeurlandmarkdownare what belong in a page.
Changed
upload_image's description now explains how to supply an image, because
field reports showed agents getting stuck here. It states the accepted formats
and size up front, describes each source and when it is usable, and names the
trap directly: an image you have only viewed (a screenshot another tool
returned) cannot be re-encoded from what you see — you saw pixels, not bytes, so
you need the actual file. The stdio and remote surfaces give different advice,
sincepathonly exists on one of them.