- backend/text_layer.py: PyMuPDF text-layer extraction, fuzzy evidence
bbox matching, 300-DPI crop rendering, coverage-gap signal
- extractor (classic + agent): TEXT LAYER block appended at call sites;
grounding guard gains text-layer rescue tier (grounding=text_layer stamp)
- verifier: {text_layer} oracle excerpt + evidence-located hi-DPI crops
replacing full-page images (fallback preserved, I2 guard intact)
- coverage gaps: text-bearing pages with zero extraction -> failed-scope
gap findings (agent) / log-only (classic)
- config knobs: TEXT_LAYER_ENABLED/MIN_CHARS/MAX_CHARS, VERIFY_TEXT_MAX_CHARS,
VERIFY_HI_DPI_CROPS, VERIFY_CROP_DPI, VERIFY_CROP_MARGIN_PTS
- tests: 22 new (text_layer unit, grounding/render, runner-level flow)
Spec: docs/superpowers/specs/2026-08-12-text-layer-grounding-design.md
11 lines
397 B
Plaintext
11 lines
397 B
Plaintext
fastapi==0.115.0
|
|
uvicorn[standard]==0.30.6
|
|
python-multipart==0.0.12
|
|
pdf2image==1.17.0
|
|
PyMuPDF>=1.23.0 # deterministic text-layer extraction (extractor grounding, verifier crops)
|
|
Pillow==10.4.0
|
|
openai==1.51.0
|
|
httpx==0.27.2 # openai 1.51 passes proxies= to httpx; >=0.28 dropped it
|
|
python-dotenv==1.0.1
|
|
# System dependency (not pip): poppler-utils -> sudo apt install poppler-utils
|