AttachmentAddTask
OpalTask attachment.add: a local folder, archive or file becomes an attachment, as a drop into the chat makes one.
| Inherits | OpalTask |
| Group | libopal |
Declared in src/libs/libopal/opal/attachment/AttachmentAddTask.hpp.
Detailed description
opal-file-tasks §OFT-2. On 2026-10-14 OPAL could not read two construct files the owner named, because only a drop made an attachment and a plain file never did. This task gives the model the same access a drop gives, after the user approves it: the task is unsafe, so the permission mode safe shows the path on the approval card first (§OFT-3). A plain file becomes a grant of that one file (AttachmentRegistry::addFile, §OFT-4).
The result names the attachment id and carries its first listing page; attachment.read, attachment.grep, attachment.glob and attachment.list then work on it. A construct file is text, so attachment.read returns its lines, which is how a damaged or old construct file is salvaged.
The tasks that read an attachment start with AttachmentReadTask, and the attachments live in AttachmentRegistry.