Clarify artifact reader ownership transfer

This commit is contained in:
2026-11-05 13:51:29 +00:00
parent 7be677c80b
commit 7d500ee62f
4 changed files with 57 additions and 3 deletions

View File

@@ -891,6 +891,11 @@ of collaborator errors. Implementations must honor cancellation, safely manage
copies they retain, avoid unsafe logging of content or credentials, and enforce
the application policy that motivated the injection.
A successful `ArtifactReader.Read` transfers the returned artifact and mutable
body storage to Promptkit. Readers that previously reused a returned buffer
must instead return independent storage and stop mutating it after return;
private scratch buffers may still be reused when the returned bytes are copied.
## Handle Errors
Use `errors.Is` with the