Summary
Round-2 P1 — observability seam paralleling the existing DeliveryLogSink. Provides an AuditSink Protocol plus LoggingAuditSink and SlackAuditSink reference implementations.
Design
Surface
AuditSink Protocol with record(event) async method
AuditEvent frozen dataclass: operation, principal_id, tenant_id, success, details, timestamp
- Reference implementations:
LoggingAuditSink — writes structured JSON via stdlib logging
SlackAuditSink — POSTs to a webhook URL on sensitive ops, configurable allowlist
- Adopters compose these via the existing
call_next() middleware seam in adcp.server
Adoption story
Salesagent's audit_logger.py (~360 LOC) maps to a thin AuditSink adapter once this lands.
Cross-references
🤖 Generated with Claude Code
Summary
Round-2 P1 — observability seam paralleling the existing
DeliveryLogSink. Provides anAuditSinkProtocol plusLoggingAuditSinkandSlackAuditSinkreference implementations.Design
Surface
AuditSinkProtocol withrecord(event)async methodAuditEventfrozen dataclass:operation,principal_id,tenant_id,success,details,timestampLoggingAuditSink— writes structured JSON via stdlibloggingSlackAuditSink— POSTs to a webhook URL on sensitive ops, configurable allowlistcall_next()middleware seam inadcp.serverAdoption story
Salesagent's
audit_logger.py(~360 LOC) maps to a thin AuditSink adapter once this lands.Cross-references
🤖 Generated with Claude Code