forgesight-audit
A tamper-evident, complete-capture audit trail for ForgeSight — a governance-grade projection of the telemetry the SDK already emits (feat-023).
It adds the three things ordinary telemetry lacks:
- Integrity — every
AuditEventis hash-chained (prev_hash/hash);verify()walks the chain so deletion, alteration, or reordering is detectable. - Complete capture — it rides the event bus, so it records every run even when the trace was head-sampled out of the exporters.
- A compliance query/export surface — query by principal / team / kind / time, roll up cost, and export an auditor bundle (JSONL + a manifest carrying the head hash).
import forgesight
from forgesight_audit import AuditListener, JsonlAuditSink, AuditQuery, verify
sink = JsonlAuditSink("audit/agent-audit.jsonl")
forgesight.configure(sample_rate=0.1, listeners=[AuditListener(sink)]) # 10% traces, 100% audit
# ... run agents as usual; audit events are recorded at source ...
assert verify(sink).intact # prove the log wasn't altered
report = sink.query(AuditQuery(principal="clinician-bot"))
print(report.event_count, report.cost_usd_total)
sink.export(AuditQuery(), to="audit/full.bundle") # JSONL + .manifest.json(head_hash)
Drivers: jsonl (default), sqlite, otel (emit as OTel log records), siem
(JSON lines to a syslog/collector). Wire it as a listener (above), via
configure(listeners=["audit"]), or forgesight_audit.install({...}) after configure().
It records — it does not enforce. Policy/budget enforcement is forgesight-governance.
Apache-2.0.
Metadata
Release files for forgesight-audit 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| forgesight_audit-0.1.1.tar.gz | 16.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| forgesight_audit-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.4 kB
Release files / forgesight_audit-0.1.1.tar.gz
| Download URL | forgesight_audit-0.1.1.tar.gz |
|---|---|
| Size | 16.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8962b3e6eff84a45a3d09ecd4863973629e9dd1a5e556f42ab512e733182ec80
|
|
BLAKE2b-256 checksum How to use checksums |
0352864dcb31c9df2819797652d34f64c37a9010e980c59f4ede84229db0582a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / forgesight_audit-0.1.1-py3-none-any.whl
| Download URL | forgesight_audit-0.1.1-py3-none-any.whl |
|---|---|
| Size | 19.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5936bbe6a774b71be1e924a6a2f010f71605f90e841091fdc3ed023eaf78f3df
|
|
BLAKE2b-256 checksum How to use checksums |
ee792b72159e43123729eadf57bca5eb9831281dc6d1fc1827106e116d84e286
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|