SigilGuard.Audit.EventType (SigilGuard v0.2.0)

View Source

Audit event types defined by the SIGIL protocol.

These match the AuditEventType enum from the sigil-protocol Rust crate (v0.1.5). Use these atoms as the type field when creating audit events for protocol compliance.

Event Types

AtomDescription
:command_executionAn agent tool/command was executed
:file_accessA file was accessed
:config_changeConfiguration was changed
:auth_successAuthentication succeeded
:auth_failureAuthentication failed
:policy_violationA security policy was violated
:security_eventA general security event
:sigil_interceptionSensitive content was intercepted by the scanner
:mcp_tool_gatedAn MCP tool call was gated
:delegation_crossingAn agent-to-agent delegation boundary was crossed

Example

event = SigilGuard.Audit.new_event(
  SigilGuard.Audit.EventType.to_string(:mcp_tool_gated),
  "did:web:alice",
  "read_file",
  "success"
)

Summary

Functions

Parse a protocol string into an event type atom.

Convert an event type atom to its protocol string representation.

Check if an atom is a valid event type.

Return all valid event types.

Types

t()

@type t() ::
  :command_execution
  | :file_access
  | :config_change
  | :auth_success
  | :auth_failure
  | :policy_violation
  | :security_event
  | :sigil_interception
  | :mcp_tool_gated
  | :delegation_crossing

Functions

from_string(arg1)

@spec from_string(String.t()) :: {:ok, t()} | :error

Parse a protocol string into an event type atom.

to_string(atom)

@spec to_string(t()) :: String.t()

Convert an event type atom to its protocol string representation.

valid?(type)

@spec valid?(atom()) :: boolean()

Check if an atom is a valid event type.

values()

@spec values() :: [t(), ...]

Return all valid event types.