mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-29 11:42:17 +00:00
Clients that send X-OpenCode-Capabilities: experimental-media-uri get user files and tool results stored in blob as media:<hash> refs with their size and dimensions instead of inline base64, from session.messages, session.message and session.inbox.list, when experimental.media_blob is on in the session's own location (the config its media was written under). Refs whose blob is gone become the same unavailable placeholder inline readers get. Every other reader, the runner and export stay inline. GET /api/experimental/media/:hash serves one blob that a stored message or inbox item still references, with an immutable ETag, 304 support, nosniff and a sandbox CSP; anything but a raster image is sent as an application/octet-stream attachment. session.prompt accepts a referenced media:<hash> ref as an attachment URI and re-admits its stored bytes as is. |
||
|---|---|---|
| .. | ||
| script | ||
| src | ||
| test | ||
| AGENTS.md | ||
| package.json | ||
| sst-env.d.ts | ||
| tsconfig.build.json | ||
| tsconfig.json | ||