citra ยท diff
git:20260731.4739610 to git:20260807.28a03e3
15 added, 26 removed. Audit C to C.
# Citra โ PDF evidence for agents
- Use Citra when agents need **citeable PDF structure** (text, tables, geometry, OCR) โ not plain-text dumps.
-
## Install
```bash
- npm i -g @sylphx/pdf-reader-mcp
- citra --help
- npx @sylphx/pdf-reader-mcp
+ npm i -g @sylphx/citra
+ # or
+ npx @sylphx/citra
```
- ## Surfaces
+ ## Tools
- | Surface | Entry |
+ | Tool | Job |
| --- | --- |
- | SDK | `import { Citra } from '@sylphx/pdf-reader-mcp/sdk'` or `.../citra` |
- | CLI | `citra` / `pdf-reader-mcp` |
- | MCP | stdio tools with page-level evidence |
+ | `read_pdf` | Agent Document Twin (structure, tables, citations) |
+ | `search_pdf` | Literal search with page/bbox evidence |
+ | `pdf_evidence` | inspect / render / crop / OCR follow-ups |
## SDK
```ts
- import { Citra } from '@sylphx/pdf-reader-mcp/sdk'
- const { payload, isError } = await Citra.create().read({
- sources: [{ path: '/abs/doc.pdf', pages: [1] }],
- })
+ import { Citra } from '@sylphx/citra/sdk'
+ const citra = Citra.create()
+ const result = await citra.read({ path: '/abs/doc.pdf' })
```
- Public proof: `bun scripts/public-proof.ts` on sample.pdf.
-
- ## Evidence contract
-
- Results include page/cell/bbox locators and honesty warnings. There is **no** `evidence_first` tool.
-
## Rules
- 1. Local-first; native binary for the current platform; fail closed if missing.
- 2. Prefer structure + evidence over prose summaries.
-
- ## Independence
-
- This repository is product SSOT. No central Instruments monorepo.
+ - Local-first; no API key required for default path
+ - Missing native binary โ fail closed
+ - Evidence on results (envelope v1); no `evidence_first` tool
+ - Do not install Prism for PDF routing