Versions in this module Expand all Collapse all v0 v0.0.7 Oct 27, 2026 v0.0.6 Oct 16, 2026 Changes in this version + const EnvOutbox + const EnvTaskID + const MaxFileBytes + const MaxProjectBytes + const MaxTaskBytes + const MaxTaskFiles + const OutboxDirName + var ErrAmbiguous = errors.New("attachments: more than one attachment matches") + var ErrNotRegular = errors.New("attachments: not a regular file") + var ErrQuota = errors.New("attachments: no room left for the file") + var ErrTooLarge = errors.New("attachments: file is over the size limit") + var ErrUnavailable = errors.New("attachments: the file is not in the store") + func Add(db *statedb.DB, dbPath string, taskID int, path string, meta Meta) (statedb.AttachmentRow, error) + func BaseName(name string) string + func CleanName(name string) string + func CloseOutbox(dbPath string, taskID int) + func Delete(db *statedb.DB, taskID int, id, actor, via string) (statedb.AttachmentRow, error) + func DetectType(name string, head []byte) string + func Env(taskID int, outbox string) []string + func HumanBytes(n int64) string + func InlineType(recorded string, head []byte) (string, bool) + func Open(dbPath string, row statedb.AttachmentRow) (*os.File, os.FileInfo, error) + func OutboxDir(dbPath string, taskID int) string + func Outboxes(dbPath string) []int + func PrepareOutbox(dbPath string, taskID int) (string, error) + func Previewable(recorded string) bool + func PromptSection(taskID int, outbox string) string + func Put(db *statedb.DB, dbPath string, taskID int, meta Meta, src io.Reader, ...) (statedb.AttachmentRow, error) + func Record(db *statedb.DB, taskID int, meta Meta, size int64, ...) (statedb.AttachmentRow, error) + func RemoveOutbox(dbPath string, taskID int) + func Resolve(rows []statedb.AttachmentRow, ref string) (statedb.AttachmentRow, error) + func Room(u statedb.AttachmentUsage, size int64) string + func StoreDir(dbPath string) string + func Summary(taskID int, rep Report) string + func Sweep(db *statedb.DB, dbPath string, minAge time.Duration) (int, error) + func TypeByName(name string) string + type IngestOptions struct + RunID string + Scrub *redact.Set + type Meta struct + AddedBy string + CreatedAt time.Time + Name string + Note string + RunID string + Source string + type Refusal struct + Name string + Reason string + type Report struct + Added []statedb.AttachmentRow + Refused []Refusal + func Ingest(db *statedb.DB, dbPath string, taskID int, opts IngestOptions) (Report, error) + func (r Report) Empty() bool