AttachmentStoreProtocol
Defined in the protocols module.AI Agent Seam for a gateway-managed attachment store (Issue #5207). Large files cannot ride inline inside a single
message frame (bounded by
max_payload), so they are streamed as chunks into a store keyed by a
reserved ref_id (reserve → put chunk at offset → close), then referenced
from :class:AttachmentRef. The contract lives in core so every client and
implementation agree on one shape; the concrete durable store (filesystem /
object store) is a wrapper/bot concern, kept out of the dependency-free core.
Methods
reserve()
Reserve an entry for an incoming file and return its
ref_id.put_chunk()
Write
data at offset for the reserved ref_id.close()
Finalize the upload and return the resulting :class:
AttachmentRef.open()
Open the stored attachment for reading (outbound download).
Source
View on GitHub
praisonaiagents/gateway/protocols.py at line 666
