feat(gateway): ingest inbound Slack text/log attachments (#1718)#1883
Open
kgabryje wants to merge 1 commit into
Open
feat(gateway): ingest inbound Slack text/log attachments (#1718)#1883kgabryje wants to merge 1 commit into
kgabryje wants to merge 1 commit into
Conversation
Extend the inbound attachment ingestion pipeline (#1847) from images-only to the text-like subset of ALLOWED_UPLOAD_MIME_TYPES (text/plain, text/markdown, text/csv, application/json). Same ingest_files opt-in, same hardened download path (slack.com allowlist with per-hop redirect revalidation, streaming byte-cap, size/count limits), same store-and-fold-path-into-prompt model. PDFs/office/archives stay out of scope (#1719). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mistercrunch
approved these changes
Jul 11, 2026
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.
Summary
Extends the inbound Slack attachment ingestion pipeline (#1847) from images-only to text-like files agents use as context: logs, plain text, CSV, JSON, and markdown.
isIngestableImageFile→isIngestableFileacceptsimage/*plus the text-like subset (text/*,application/json) of the existingALLOWED_UPLOAD_MIME_TYPESupload-route allowlist — no new MIME list is introduced; the security boundary stays defined in one place.text/htmllogin pages,image/svg+xml, scripts, and allowlisted-but-out-of-scope types likeapplication/pdf).ingestInboundImageAttachments→ingestInboundAttachments. All hardening is unchanged: slack.com host allowlist with per-hop redirect revalidation, streaming byte-cap on actual received bytes, per-file size and per-message count ceilings,file.id-prefixed filenames, graceful degradation (failures append a note, never throw).ingest_filesflag andfiles:readscope — no new flag or scope. UI labels/tooltips and the MCP tool description updated from "images" to "images and text files".Out of scope (deferred to #1719): PDFs, office documents, OCR, media.
Tests
isIngestableFileaccepts text/plain, text/csv, text/markdown, application/json; rejects application/x-sh, application/xml, image/svg+xml, text/html, and allowlisted-but-out-of-scope application/pdf and application/zipingest_filesoff → no download (existing coverage, unchanged)Full daemon suite: 1643 passed.
pnpm checkgreen.🤖 Generated with Claude Code