Skip to main content

agentrust-capture-core

Shared fingerprinting, comparison and baseline-sealing core for AgenTrust agent-integrity capture engines.

Each engine answers one question about a different coding agent:

Is this the agent composition I approved, with nothing added and nothing subtracted?

What differs between agents is where to look and what to call things. What must not differ is how content is fingerprinted, how snapshots are compared, how a baseline is sealed, and the rules that keep a report honest. This package owns the second list.

Why it exists

Those parts lived in three copies, and the cost was not theoretical:

  • The same skill-fingerprinting bypass had to be found and fixed twice, independently, in two shipped engines. A component was digested by its manifest alone, so a payload swapped into a sibling scripts/ directory left the fingerprint unchanged and the report said "nothing added, nothing subtracted".
  • A reporting defect that rendered unmeasured categories as measured zeros was fixed in one engine while the other kept shipping it.

A fourth engine would have meant writing both bugs a fourth time.

What it does not do

No dependencies. The engines are invoked by shell hooks at session start and must the smallest possible install for a drift check, so this package is standard library only and a test asserts it.

No opinion on where an agent keeps its files, what its categories are called, or how its report is laid out. Baseline scoping in particular is deliberately not unified: Claude Code keeps one baseline per machine, Codex keeps one per workspace because a workspace carries its own instructions and skills. Both are correct for their agent, so an engine supplies its own paths.

The pieces

Module Owns
hashing tree_digest over a component directory, file and mapping digests, the exclusion denylist, uuid7, now_iso
seal Sealing a baseline with a content digest and checking it: ok, unsealed, broken
compare Map, set, scalar and rollup diffs, plus observed-category and measurement-scope gating
state Atomic write, load-corrupt-as-absent, sealed baseline write
report The honesty vocabulary: unmeasured labelling, partial-coverage qualification, the baseline-integrity block

Two rules worth knowing before you use it

An unmeasured category is not an empty one. A shell hook cannot see a live tool roster or the model. Rendering those as 0 tools states a measurement that was never taken, and a reader who cannot tell "we did not check" from "we checked and found nothing" treats an absence as a pass. Use measured_or and unmeasured_footnote.

A partial check is not a clean bill of health. clean_verdict(complete=False) qualifies the verdict as "in the categories checked".

On what sealing is worth

attach_seal stores a SHA-256 digest of the baseline's own content. It catches corruption, truncation, and a hand-edit that does not recompute it. It does not catch an attacker who owns the state directory, who can recompute the digest as easily as this package can.

An earlier design used an HMAC with a locally stored secret. It was removed: the only adversary an HMAC defeats here is one who can write the state directory without being able to read it, which barely exists on a developer machine, and the stored secret was a credential to leak in exchange.

The control that does survive a real adversary is off-box. Engines print the baseline digest on approve and on verify, so a human who recorded the first sees a silent re-baseline even when the attacker resealed it perfectly. There is a test that makes this limit executable rather than prose.

License

Apache-2.0.

Metadata

Release files for agentrust-capture-core 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentrust-capture-core 0.1.3
File Size Uploaded
agentrust_capture_core-0.1.3.tar.gz 19.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agentrust-capture-core 0.1.3
File Interpreter ABI Platform
agentrust_capture_core-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 38.3 kB

Release files / agentrust_capture_core-0.1.3.tar.gz

Download URL agentrust_capture_core-0.1.3.tar.gz
Size 19.3 kB
Tags Source
SHA-256 checksum
How to use checksums
eed07ef9595591c536d88a76baf63a515dccab5ad97c7769a194ec0a9bc2a7d0
BLAKE2b-256 checksum
How to use checksums
03335745d417272e603cec9079ef31583f8bd0fe96e13f0cd6d4cafbf7e3b791
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / agentrust_capture_core-0.1.3-py3-none-any.whl

Download URL agentrust_capture_core-0.1.3-py3-none-any.whl
Size 19.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2093c1879e39adb38cf242e09cbe8d32129962fe3518df2bbd7a0ed812d5aead
BLAKE2b-256 checksum
How to use checksums
528bfbc7f26a67f2a4a9db37d5b6ebcddb9153065c12fb191282fe28230a6eb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page