making use of the extended perms and added future work
This commit is contained in:
1 parent
296e465f48
commit
22fd8fbce8
19 files changed
+617
-40
No files matched your search
@@ -0,0 +1,9 @@
|
||||
# Attachments into the container
|
||||
|
||||
Files attached to a message to the bot (images, logs, zips) end up in the container, so the agent can use them.
|
||||
|
||||
- Message events with `subtype: file_share` are dropped today (`bot.onEvent` only takes messages with no subtype). Accept `file_share` too.
|
||||
- For each entry in `files[]`, download `url_private_download` with the bot token (`files:read`), and write it to `/root/slack-uploads/<message ts>/<name>`.
|
||||
- Add the paths to the prompt text: `(Attached: /root/slack-uploads/…/report.pdf)`.
|
||||
- Writing needs a node operation, `write_file(machine, path)`, that streams chunks like `import_home` / `write_import`. It's the mirror of `read_file` in [send-files-to-user.md](send-files-to-user.md), so build the two together. It's an additive call name in `manager/cluster.go`, and old slaves get a polite "this node can't take attachments yet".
|
||||
- Size cap: reuse `max_send_file_mb`. The home's btrfs quota still applies, so an upload that doesn't fit fails with a clear message.
|
||||
Reference in new issue
Block a user