feat(buyer): PDF_ENABLED kill switch for the PDF summarizer

PDF_ENABLED=0 skips the JobStore/PdfJobDb wiring in runMain, so every
/v1/pdf-* route responds 503 (the pre-existing disabled path). Default
stays enabled; only "0"/"1" accepted, misconfig fails boot loudly.
This commit is contained in:
david
2026-08-21 02:14:32 +02:00
parent c531e4678f
commit 5221815a71
5 changed files with 62 additions and 22 deletions

View File

@@ -42,6 +42,8 @@ NETWORK_ID=0
# Upload a PDF → chunk it → pay suppliers to summarize each chunk (one escrow
# per map + reduce call) → full-book summary. All knobs are optional; defaults
# shown. Tune the caps to bound spend/abuse on mainnet.
# Kill switch: "0" disables the feature entirely (every /v1/pdf-* route 503s):
# PDF_ENABLED=1
#
# Hard caps (a job is refused if it would exceed these):
# PDF_MAX_PAGES=400 # reject books larger than this