feat(email): result as HTML body, intermediate steps as .md + .pdf attachments

- Final pipeline result becomes the email body (plain text + HTML
  rendered from Markdown via multipart/alternative)
- All intermediate steps (transcript + prior analyses) are attached
  each as a .md file and a .pdf file
- _md_to_pdf(): pure-Python PDF generation via fpdf2 with minimal
  Markdown rendering (headers, bullets, numbered lists, inline cleanup)
- _collect_doc_chain(): walks source_document_id links to gather all
  ancestor documents oldest-first
- Add fpdf2==2.8.3 to requirements.txt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-23 15:27:52 +02:00
parent a2ddb6b94d
commit aff166f89d
2 changed files with 123 additions and 15 deletions

View File

@@ -3,3 +3,4 @@ uvicorn[standard]==0.32.1
requests==2.32.3
python-multipart==0.0.12
markdown==3.7
fpdf2==2.8.3