Skip to content

Add audit event package graduated from toolhive#81

Merged
rdimitrov merged 2 commits intomainfrom
jaosorior/add-audit-package
Apr 9, 2026
Merged

Add audit event package graduated from toolhive#81
rdimitrov merged 2 commits intomainfrom
jaosorior/add-audit-package

Conversation

@JAORMX
Copy link
Copy Markdown
Contributor

@JAORMX JAORMX commented Apr 9, 2026

Summary

ToolHive and other ecosystem projects need a shared audit event format for NIST SP 800-53 compliance. This graduates the core audit event types from the toolhive repository into toolhive-core so all projects can depend on a common, well-tested foundation.

  • Adds audit package with AuditEvent, EventMetadata, and EventSource structs
  • Includes constructors (NewAuditEvent, NewAuditEventWithID), builder methods (WithTarget, WithData, WithDataFromString), and slog-based structured logging via LogTo
  • Defines well-known constants for outcomes, source types, and the ToolHive component name
  • MCP-specific event types and field key constants remain in toolhive where they belong

Type of change

  • New feature (non-breaking change which adds functionality)

Test plan

  • task test passes (all existing + new tests)
  • task lint passes with no issues
  • New tests cover constructors, builder methods, JSON round-trip serialization, metadata/source extras, and LogTo structured log output

Generated with Claude Code

The audit package provides NIST SP 800-53 compliant audit event
structures and utilities for the ToolHive ecosystem. This graduates
the core event types (AuditEvent, EventMetadata, EventSource),
constructors, builder methods, and slog-based logging from the
toolhive repository into toolhive-core so all ecosystem projects
can share a common audit event format.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rdimitrov rdimitrov enabled auto-merge April 9, 2026 18:47
@rdimitrov rdimitrov merged commit b1b6367 into main Apr 9, 2026
5 checks passed
@rdimitrov rdimitrov deleted the jaosorior/add-audit-package branch April 9, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants