Skip to content

Extract text from 103 file types in File Search (#1381) - #1401

Merged
helpcodeai merged 2 commits into
mainfrom
feat/file-search-more-formats
Nov 1, 2026
Merged

helpcodeai merged 2 commits into
mainfrom
feat/file-search-more-formats

Conversation

@helpcodeai

Copy link
Copy Markdown
Contributor

Summary

The owner asked that File Search read almost every file type that has extractable text. The extractor goes from 23 to 103 extensions; the image grows by 0.19 MB.

ee/ authorization: the owner explicitly authorized changes under deploy/ee/file-extractor/ (and packages/backend/src/ee/file-search/) for File Search; nothing else under ee/ is touched.

Changes

  • Office variants: .docm .dotx .dotm .xltx .xltm .xlsb .pptm .ppsx .ppsm .potx .potm, OpenDocument templates .ott .ots .otp.
    • .xlsb uses pyxlsb 1.0.10: pure Python, LGPLv3+, dates come out as serials.
  • New readers:
    • .epub: chapters in reading order; DRM-protected books are reported as encrypted.
    • .xps / .oxps: one item per page.
    • .pages .numbers .key: text of the embedded PDF preview, if there is one.
    • .svg: text, title and description only, with a safe XML parser.
    • .dxf: ASCII only; TEXT, MTEXT, ATTRIB and dimension text.
    • .mbox: one item per message, attachments listed by name.
  • Text family: .yaml .yml .toml .ini .cfg .conf .properties .sql .tex .bib .srt .vtt .ics .vcf .kml .gpx and common source code. Decoded like .txt; binary content is refused.
  • Unchanged rules: ZIP formats go through the zip-bomb guard; XML never resolves external entities; DTDs on XPS pages are refused. The new types also work as e-mail attachments.
  • Backend: the extension list in file-search.types.ts matches the extractor's /formats exactly, enforced by a new spec.
  • Wizard: the file-type filters gain "Drawings (SVG, DXF)" and "Code & config" (en/de/it).
  • Compose: extractor image tag :1 → :2, so deploys rebuild it.
  • Docs: docs/connectors/file-search.md, llms-full.txt.
  • Not possible: .dwg (no free reader; the message suggests DXF) and the native iWork format.

Cloud and self-hosted alike.

Type

  • New feature

Testing

  • Added/updated unit tests
Directory Command Result
deploy/ee/file-extractor .venv/bin/python -m pytest -q -rs 192 passed, 7 skipped (OCR and real Office samples, as before)
deploy/ee/file-extractor ./test.sh (host + read-only no-network container + HTTP checks) exit 0; container 194 passed, 5 skipped
root docker build -t amcp-file-extractor:formats deploy/ee/file-extractor built; 251.18 MB → 251.37 MB
packages/backend npx tsc --noEmit -p tsconfig.json clean
packages/backend npx jest src/file-search src/ee/file-search --maxWorkers=4 56 passed, 5 skipped (gated integration)
packages/frontend npx tsc --noEmit -p tsconfig.json clean
root node scripts/generate-llms-txt.mjs --check fresh

New tests in tests/test_more_formats.py cover XXE attempts in SVG, EPUB and XPS, and an entity bomb in KML/GPX.

Related Issues

Relates to #1381, #1379.

Adds configuration and source-code text files (with a binary sniff, so a
.ts video is not indexed as noise), Office macro/template/show variants,
OpenDocument templates, .xlsb (pyxlsb), SVG, ASCII DXF, EPUB, XPS/OXPS,
iWork files through their PDF preview, and .mbox mailboxes. Every new ZIP
format goes through the bomb guard and every XML part through defusedxml;
DWG and binary DXF report unsupported with a hint.

Refs #1379
The backend extension list, the wizard's type filters (new Drawings and
Code groups) and the docs follow the extractor's /formats. The extractor
image tag moves to :2 so deploys rebuild it.

Refs #1379
@helpcodeai
helpcodeai force-pushed the feat/file-search-more-formats branch from f607607 to dc071a0 Compare November 1, 2026 18:27
@helpcodeai
helpcodeai merged commit 5a846b3 into main Nov 1, 2026
14 checks passed
@helpcodeai
helpcodeai deleted the feat/file-search-more-formats branch November 1, 2026 18:41
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant