feat(api): add public run attachment upload - #252
Open
jojotaro1994 wants to merge 1 commit into
Open
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.
Summary
Adds a thin Public API wrapper around StaffDeck’s existing chat attachment staging and TaskFrame materialization flow.
POST /agents/{agent_id}/attachmentsformultipart/form-datawith repeatedfiles[]fields.runs:createscope and returnsChatAttachmentRead[].AgentRunCreate.attachments; new and streaming Runs share staged-attachment validation.materialize_task_attachments()so each TaskFrame receives an isolated workspace copy.Configuration
CHAT_ATTACHMENT_MAX_BYTEScontrols the UI upload, Public API upload, and Run validation limit. The default is 12 MiB (12582912bytes). This remains a finite limit because the current upload path reads the request into memory. Harness file tools and individual Skills may impose lower limits.Scope
This PR intentionally does not add a database table or migration, new Attachment scope, remote URL fetch, query/delete endpoints, TTL cleanup, Session inheritance, or Plane/Bella-specific logic. Staging remains isolated by tenant, actor user, and attachment ID; formal staging lifecycle management is a known limitation.
Validation
131 passed.2006 passed, 10 failed; the failures are existing environment/service issues: five General Skill runtime dependency tests fail because the generated macOS runtime is missinglibpython3.11.dylib, and five tool-auth-matrix service tests fail against the local SQLite/service-auth fixture (human_handoff_requeststable errors). No attachment-focused test failed.git diff --check: passed.E,F,I): passed.ruff check backendremains blocked by the upstream baseline (1987existing findings).