Skip to content

A7: attachments and embedded images - #46

Merged
jallers merged 1 commit into
proposed_type_script_api_versionfrom
claude/admiring-ride-vsq4sa
Nov 7, 2026
Merged

jallers merged 1 commit into
proposed_type_script_api_versionfrom
claude/admiring-ride-vsq4sa

Conversation

@jallers

@jallers jallers commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

The SDK now covers the files attached to an asset, so consumers no longer call attachment.img or EmbeddedImage.mvc themselves.

  • client.attachments: list (metadata only, paged), info, get (metadata plus bytes), add, put, remove and url. add sends 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 throws AttachmentUploadError naming the empty attachment it left.
  • client.embeddedImages: upload returns the <img src> URL, plus url and normalize. It works with token auth. Agility can't delete embedded images, so their live test is opt-in.
  • Plumbing: bytes can be a Uint8Array, ArrayBuffer or Blob, and Base64 doesn't use Buffer, so this works in Node and the browser. The transport now sends a Blob as 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

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
@jallers
jallers merged commit d51fb16 into proposed_type_script_api_version Nov 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants