{"service":"adhivakta-corpus-worker","description":"Global corpus WRITE path (offline KG pipeline §12): signed /v1/corpus/ingest -> adhivakta-corpus Queue -> D1 (kg_nodes/kg_edges + 0026-0030 sidecars) + Vectorize -> r2-sync. Authority refresh runs end-of-day in kg-worker.","endpoints":{"GET /health":"liveness probe","POST /v1/corpus/ingest":"service-token + HMAC; gzip CorpusDeltaBatch -> dedupe -> enqueue -> 202 { batchId, accepted, cursor }","GET /v1/corpus/sources":"data-source allowlist (corpus_sources; OFF by default)","PUT /v1/corpus/sources":"upsert a data-source row (owner/admin)","GET /v1/corpus/batches":"applied-batch ledger (corpus_batches)","GET /v1/corpus/errors":"sync-side error log (corpus_errors)","POST /v1/corpus/retrigger":"replay a failed/DLQ batch from staging (owner/admin)","POST /v1/corpus/purge-non-indian":"Indian-only KG maintenance: scan kg_nodes and remove positively-foreign OR non-English nodes (+ Vectorize). Dry-run by default; ?apply=true to delete (owner/admin)","POST /v1/corpus/purge-low-quality":"Corpus-quality maintenance: scan kg_nodes and remove positively low-quality nodes (OCR-noise labels + generic high-in_degree hub fragments) (+ Vectorize). Dry-run by default; ?apply=true to delete (owner/admin)","POST /v1/corpus/backfill-court-year":"KG maintenance: derive missing court/year from the citation in each node's neutral cite/id/label. Dry-run by default; ?apply=true to write (owner/admin)"}}