Repository navigation
feat: expose durable operator image attachments (#846) - #879
Merged
Merged
Conversation
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.
Independent clients can now upload one image and send it through the same durable message operation as the UI.
attachment_uploadreturns an operator/routine-bound reference;attachment_readretrieves owned bytes;prompt_agentaccepts the reference with text or an empty image-only prompt. The existing 10 MB PNG/JPEG/GIF/WebP limit applies to both surfaces.The shared storage boundary checks size, image headers, ownership, workspace, regular files and content digests. Upload retries deduplicate live identical content. Missing or changed bytes can be reuploaded under a fresh reference. Message admission and cleanup serialize through the database: active messages protect their image, settled work receives normal retention, and expired references retain metadata. Exact prompt retries return the original receipt even after image expiry or a workspace move. Delivery occurs after durable attachment admission; acceptance does not assert image consumption or provider completion.
Both composers use the same validation and refuse the entire message on invalid upload. MCP tools require verified human identity and never accept caller-selected server paths. Legacy text-only retries, optional null idempotency keys and existing upload links remain supported. The main HTTP body bound is 14 MB for the base64 envelope; the memory endpoint remains at 2 MB. Validation recognizes image headers; it is not full codec decoding or sanitization.
Validation
Operating note
Adds the operator attachment metadata table and nullable message reference. Adoption requires pull, migrate and restart. No existing image paths or text receipts are rewritten. The new facilities remain human-only; caretaker and delegated-agent authority is unchanged. Cleanup retains queued, executing and waiting images, then tombstones expired references before attempting file removal; failed removal is retried later.
Implements attachment acceptance slice A of #846. The parent remains open for its remaining shared operator-action inventory and related client proofs.