Skip to content

feat(decisioning): AuditSink Protocol + reference implementations #351

@bokelley

Description

@bokelley

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions