v1.0 · Stable · Apache-2.0

PDFDTP
Document Transaction Protocol (PDF)

Request/response protocol for transactional document editing — engines return certificates proving minimal mutation, plus hash-chained journal entries for audit and undo.

examples/request.json
{
  "dcp": "1.0",
  "doc": "/abs/path/invoice.pdf",
  "ops": [
    {
      "op": "replace_text",
      "target": "text:'invoice #42'",
      "text": "invoice #43"
    }
  ],
  "contract": {
    "only_touch": ["e12"],
    "max_mutations": 1
  },
  "journal": true,
  "strict": true
} 
…

Why it exists

PDFDTP defines a request/response protocol for transactional document editing, designed for AI agents. Where current tooling answers "ok", a conforming engine answers with a certificate: machine-checkable proof of what the edit did — and the data to undo it. Transport-agnostic: MCP tools/call, stdio, HTTP, or in-process.

Key properties

contract

The agent declares what may be touched before the edit: only_touch, max_mutations.

certificate

Proof that only authorized nodes changed — touched, untouched_changed, render_diff_zones.

journal_entry

Hash-chained provenance carrying inverse_ops — audit and rollback to any seq.

strict mode

Failed verification under strict: true rolls the document back — atomicity by default.

Transport-agnostic

Rides on MCP tools/call, stdio, HTTP or in-process calls.

Shared vocabulary

Same typed issues as PDFSP — one error model across the suite.

Related specifications

SpecFull nameRelation
PDFSPPDF Scene PatchThe op vocabulary carried in ops — PDFSP/1.0.
PDFADPDF Agent Descriptorjournal_head and capabilities reflect DTP state.