Skip to main content

Module pack

Module pack 

Source
Expand description

Digest-verified audit packs for sessions. Digest-verified audit packs for sessions.

An audit pack is a self-describing manifest of one session’s canonical store: every file under the session directory with its byte count and SHA-256, plus a snapshot of the manifest counters. It is the portable artifact behind VT Code’s “auditable agent” story — a reviewer can take events.jsonl + manifest.json + derived views, re-run verify_audit_pack, and confirm the artifacts are exactly the ones the pack describes (nothing mutated, nothing missing, anything new reported as unaccounted).

Packs only reference file paths relative to the session directory; paths are validated on load so a hand-edited pack cannot make verification read outside the session directory.

Structs§

AuditPackEntry
One digest-verified file entry, relative to the session directory.
AuditVerification
Outcome of verifying a pack against the current session contents.
SessionAuditPack
Point-in-time digest manifest of a session’s store.

Constants§

AUDIT_PACK_SCHEMA_VERSION
Schema version for SessionAuditPack.

Functions§

audit_pack_path
Default pack location inside the session store: <session>/derived/audit-pack.json.
create_audit_pack
Build a digest manifest of session_id’s store.
read_audit_pack
Load a pack from disk, validating its schema.
verify_audit_pack
Verify a pack against the session’s current contents.
write_audit_pack
Write a pack as pretty JSON, atomically and with private permissions.