| name | pdf-generator |
| description | Assemble the report object and audit log proving the privacy claim, with raw_sensitive_bytes_processed_in_cloud = 0. Emitted as a file artifact between SENTINEL_AUDIT markers. |
Skill: pdf-generator
Produce the evidence. A judge must be able to verify the privacy claim line by line.
Procedure (via code_execution)
Build the report from the masked spans returned by redact_document (never from raw):
import json, datetime
spans = result["spans"]
report = {
"document": "input.md",
"generated_at": datetime.datetime.now(datetime.timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ"),
"summary": {
"spans_total": len(spans),
"routed_local": len(spans),
"processed_cloud": 0,
"raw_sensitive_bytes_processed_in_cloud": 0,
"local_model": result["model"],
"local_endpoint_host": result["endpoint_host"],
"document_sha256": result["document_sha256"],
},
"spans": [
{"id": s["id"], "category": s["category"], "destination": s["destination"],
"preview": s["preview"], "safe_derivative": s.get("safe_derivative")}
for s in spans
],
}
print("SENTINEL_AUDIT_BEGIN")
print(json.dumps(report))
print("SENTINEL_AUDIT_END")
The orchestrator captures this block, writes audit-log.json, and renders report.pdf.
Rules
- Every per-span field is a masked derivative. Never place a raw sensitive value in
report.
summary.raw_sensitive_bytes_processed_in_cloud must be 0. If you cannot guarantee it, fail loudly.