Repository navigation
feat(slack): attachment metadata + read-only file download (API + CLI) - #101
Merged
Merged
Conversation
history/replies/search now return a minimal, URL-free `files` list per message. New operator-gated routes GET /api/agent/slack/file and /api/agent/slack/file/content with CLI `dapier slack file-info` and `dapier slack download` resolve a file only from Slack metadata (files.info, or the carrying message via --channel/--ts), fetch it with the connection token from files.slack.com only (redirects pinned to that host), refuse sign-in HTML and files over 4 MiB, and report missing scopes actionably. The CLI verifies size/sha256 and never prints content. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hub intake 761b08c7-83e0-4f1b-b5bc-6ab5ae41d4b1: read Slack attachments through Dapier.
What
slack history/replies/searchnow return afileslist on every message, with minimal metadata only: id, name, title, mimetype, filetype, size, mode, external flag, image dimensions. URLs, thumbnails, previews and the uploader are left out. Existing fields are unchanged.GET /api/agent/slack/file(slack.file_info)GET /api/agent/slack/file/content(slack.file_download)dapier slack file-info F…anddapier slack download F… [-o PATH] [--force]. Both accept--channel/--tsand--connection; the default connection is theslackbot.Safety
files.info, or the message named by--channel/--ts. There is no caller-supplied URL.https://files.slack.com. Redirects are followed only within that host, and the token is never sent elsewhere. Sign-in HTML is refused, and so is a byte count that does not match Slack's metadata.files:read, and points to--channel/--tsor another connection. No scope or OAuth changes.--force, and never prints the content.Parity
These are read-only operator proxy routes, like the existing
dapier slack history/replies/post, which have no console view. Nothing here mutates state, so no console counterpart is needed.Tests
tests/test_slack_files.pyuses synthetic fixtures only (no real files). Targeted run of slack tests locally: 75 passed. CI runs the full suite.Docs:
docs/slack-attachments.md.