Repository navigation
A7: attachments and embedded images - #46
Merged
jallers merged 1 commit intoNov 7, 2026
Merged
Conversation
The SDK now covers the files attached to an asset, so no consumer calls attachment.img or EmbeddedImage.mvc itself. - wire/attachment: attachment.img bytes in and out (by numeric id; 404 and 413 as NOT_FOUND / TOO_LARGE), EmbeddedImage.mvc/Upload (multipart image + oidToken; the URL parsed out of the HTML it answers), attachment and embedded-image URLs, embedded.img URL normalising, and Base64 without Buffer. The transport sends a Blob as is. - client.attachments: list (metadata only, paged), info, get (metadata and bytes), add (inline Base64 up to INLINE_LIMIT, what agility-rooms does; create-then-upload above it, as the docs prescribe, with AttachmentUploadError naming the empty attachment a failed upload leaves), put, remove, url. - client.embeddedImages: upload, url, normalize. Live (v1sdktesting): inline and two-step adds, list, get, put, remove. An EmbeddedImage cannot be deleted, so its live test is opt-in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016NSWj9gL1oCubj5e2anVkb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The SDK now covers the files attached to an asset, so consumers no longer call
attachment.imgorEmbeddedImage.mvcthemselves.client.attachments:list(metadata only, paged),info,get(metadata plus bytes),add,put,removeandurl.addsends a small file inline as Base64, which is how agility-rooms does it, and a large one in two steps (create, then upload), as the docs prescribe. A failed upload throwsAttachmentUploadErrornaming the empty attachment it left.client.embeddedImages:uploadreturns the<img src>URL, plusurlandnormalize. It works with token auth. Agility can't delete embedded images, so their live test is opt-in.Uint8Array,ArrayBufferorBlob, and Base64 doesn't useBuffer, so this works in Node and the browser. The transport now sends aBlobas is. Plan 001 ticks A7 and marks gh-v1's C4 as unblocked.All 124 unit tests pass. On v1sdktesting, inline and two-step uploads, listing, reading back, replacing and deleting all work.
Generated by Claude Code