This SDK is the minimum cross-plugin handoff contract for scientific-tool observations. It standardizes exact evidence bytes, activity provenance, retained failures, negative results and claim references without allowing a producing plugin to authorize execution or self-assert scientific validity.
Every conformant generic receipt is fixed to:
authority_scope: OBSERVATION_ONLY;scientific_interpretation: NOT_ASSESSED;attestation_scope: PRODUCER_ORIGIN_ONLYfor evidence records.
A plugin, Agent, MCP server, service account or fixture may emit a record. Its presence, digest or signature does not make the issuer trusted and does not establish independence, scientific validity, laboratory performance or productivity improvement.
An SDK receipt is deliberately different from
exowarrant.run-receipt.v1. The latter is accepted only after a locked study contract,
profile preflight, named-human authorization, one-time authorization consumption,
institution-pinned trust checks and endpoint-ledger validation. There is no automatic
promotion path.
upstream plugin evidence record(s)
│
▼
downstream plugin operation
│
├── output / log / metric evidence records
├── explicit negative-result records
├── explicit missing / redacted / not-produced records
└── observation-only tool receipt
│
▼
evidence bundle v1
│
schema + digest + binding checks
│
▼
ExoWarrant evidence reference only
(never automatic authorization/warrant)
The transport bundle contains all evidence records linked by one receipt. Unlinked records, duplicate evidence IDs, digest mismatches, cross-study binding, and outputs attributed to a different producing plugin fail closed.
The normative JSON Schemas are installed with the ExoWarrant schema registry:
exowarrant.sdk.evidence-record.v1exowarrant.sdk.tool-receipt.v1exowarrant.sdk.evidence-bundle.v1
Unknown versions are refused. A schema change that alters meaning requires a new
schema_version; consumers must never silently fall back to an older interpretation.
PRESENT requires an exact SHA-256 and media type. MISSING, REDACTED, and
NOT_PRODUCED require an explicit reason and cannot carry a content digest. Only
PRESENT evidence can be converted to the existing protocol evidence_ref shape.
Generic plugin receipts may reference a preregistered claim only as NOT_ASSESSED or
NOT_APPLICABLE. Positive levels belong to a separate, policy-governed warrant
assessment. This prevents downstream consumers that read only per-claim fields from
mistaking an activity receipt for a scientific verdict.
FAILEDrequires at least one severityERROR.PARTIALrequires a limitation, negative result or error.STOPPEDrequires a limitation or error.COMPLETEDcannot contain severityERROR.- Negative results cite retained records whose role is exactly
NEGATIVE_RESULT.
from pathlib import Path
from exowarrant import EvidenceReceiptSDK
from exowarrant.jsonutil import load_json_file
sdk = EvidenceReceiptSDK()
bundle = load_json_file(Path("evidence-bundle.v1.json"))
# Metadata conformance only. Payload bytes have not been checked.
report = sdk.validate_bundle(bundle)
assert report.status == "CONFORMANT_METADATA_ONLY"
assert report.scientific_validity == "NOT_ASSESSED"
# For exact-byte conformance, supply every PRESENT record by evidence_id.
report = sdk.validate_bundle(
bundle,
payloads={
"evidence-input-001": Path("input.csv").read_bytes(),
"evidence-output-001": Path("output.csv").read_bytes(),
},
)
assert report.status == "CONFORMANT_WITH_PAYLOADS"The builder requires the caller to supply IDs, timestamps, actors and evidence. It does not invent them:
bundle = sdk.build_bundle(
bundle_id=bundle_id,
emitted_at=emitted_at,
evidence_records=records,
receipt=receipt,
)Read-only CLI validation:
exowarrant-sdk validate-bundle .\evidence-bundle.v1.json
exowarrant-sdk validate-bundle .\evidence-bundle.v1.json `
--payload evidence-input-001=.\input.csv `
--payload evidence-output-001=.\output.csvThe dependency-light TypeScript implementation is in sdk/typescript. It exports the
artifact types, canonical JSON/SHA-256 helpers, evidence-link builder and bundle semantic
validator. JSON Schema validation remains normative and should run before semantic checks.
Set-Location sdk\typescript
npm ci
npm testPython and TypeScript must produce the same digest for the published valid bundle. The conformance test pins that cross-language vector.
conformance-fixtures/valid/evidence-bundle.v1.json is the canonical transport vector.
Its exact payloads are in conformance-fixtures/payloads. The expected bundle digest and
negative mutation cases are recorded in conformance-fixtures/vectors.v1.json.
Passing these fixtures means only that an implementation conforms to the SDK contract.
Synthetic actors, data and outputs in the fixtures are TEST_ONLY evidence and must not
be reported as independent or scientific validation.
- Use a stable
plugin_id, exact plugin version and boundedcapability_id. - Reuse the same binding across the receipt and every linked record.
- Use
STUDY_BOUNDonly when an existing study ID and exact contract digest are known. - Hash exact raw bytes; do not hash a normalized reconstruction of instrument/data files.
- Keep unknown container or environment digests explicitly
null; never fabricate them. - Retain errors, stopped operations, negative results, missing outputs and redactions.
- Treat signatures as unverified until an operator-pinned trust policy checks them.
- Hand the receipt to BioNexus or ExoWarrant as evidence input only; neither integration can bypass its own policy, authorization, trust or human-decision gates.