Skip to content

Reference

Types

Decision, Finding, EvidenceRecord and the literals they use.

Changing Decision or EvidenceRecord is a breaking change.

Decision

FieldTypeNotes
verdictVerdictThe strongest action any finding produced.
textstrPossibly redacted or rewritten. Use this going forward.
original_textstrWhat you passed in.
findingslist[Finding]Empty when nothing fired.
evidenceEvidenceRecordAlways present, including on allow.
elapsed_msfloatWall clock for the scan.
tiers_runlist[str]Which tiers actually executed.

Finding

FieldTypeNotes
detector_idstr
tierstr
labelstrFor example email, prompt_injection.
scorefloat0.0 to 1.0.
spantuple[int, int] | NoneCharacter offsets into original_text.
actionActionWhat the policy said to do.
model_idstr | NoneNone for rule detectors.
model_revisionstr | None

EvidenceRecord

FieldTypeNotes
record_idstrUUIDv7.
timestampstrRFC 3339, UTC.
direction"input" | "output"
policy_idstr
policy_hashstrsha256 of the resolved policy.
library_versionstr
detectorslist[DetectorAttestation]id, model id, revision, weights sha256.
input_hashstrsha256 of the original text.
verdictstr
finding_summarylist[dict]detector_id, label, score, action.
signaturestr | NoneEd25519 over the canonical JSON.

The record is frozen and its collections are tuples. A mutable list inside an audit artifact is not immutable in any useful sense.

Literals

Verdict   = "allow" | "redact" | "block" | "flag"Action    = "block" | "redact" | "rewrite" | "flag" | "log"Tier      = "T0" | "T1" | "T2" | "T3"Direction = "input" | "output"

This page is generated from docs/reference/types.md in the library repository. Read it as markdown, or edit it at the source.