Skip to main content

AuditAction

Enum AuditAction 

Source
pub enum AuditAction {
Show 26 variants McpToolCall { server: String, tool: String, args_hash: ContentHash, }, CapsuleToolCall { capsule_id: String, tool: String, args_hash: ContentHash, }, McpResourceRead { server: String, uri: String, }, McpPromptGet { server: String, name: String, }, McpElicitation { request_id: String, schema: String, }, McpUrlElicitation { url: String, interaction_type: String, }, McpSampling { model: String, prompt_tokens: usize, }, FileRead { path: String, }, FileWrite { path: String, content_hash: ContentHash, }, FileDelete { path: String, }, CapabilityCreated { token_id: TokenId, resource: String, permissions: Vec<Permission>, scope: ApprovalScope, }, CapabilityRevoked { token_id: TokenId, reason: String, }, ApprovalRequested { action_type: String, resource: String, risk_level: RiskLevel, }, ApprovalGranted { action: String, resource: Option<String>, scope: ApprovalScope, }, ApprovalDenied { action: String, reason: Option<String>, }, SessionStarted { user_id: [u8; 8], platform: String, }, SessionEnded { reason: String, duration_secs: u64, }, ContextSummarized { evicted_count: usize, tokens_freed: usize, }, LlmRequest { model: String, input_tokens: usize, output_tokens: usize, }, ServerStarted { name: String, transport: String, binary_hash: Option<ContentHash>, }, ServerStopped { name: String, reason: String, }, ElicitationSent { request_id: String, server: String, elicitation_type: String, }, ElicitationReceived { request_id: String, action: String, }, SecurityViolation { violation_type: String, details: String, risk_level: RiskLevel, }, SubAgentSpawned { parent_session_id: String, child_session_id: String, description: String, }, ConfigReloaded,
}
Expand description

Actions that can be audited.

Variants§

§

McpToolCall

MCP tool was called.

Fields

§server: String

Server name.

§tool: String

Tool name.

§args_hash: ContentHash

Hash of the arguments (not the args themselves for privacy).

§

CapsuleToolCall

Capsule tool was called.

Fields

§capsule_id: String

Capsule ID.

§tool: String

Tool name.

§args_hash: ContentHash

Hash of the arguments (not the args themselves for privacy).

§

McpResourceRead

MCP resource was read.

Fields

§server: String

Server name.

§uri: String

Resource URI.

§

McpPromptGet

MCP prompt was retrieved.

Fields

§server: String

Server name.

§name: String

Prompt name.

§

McpElicitation

MCP elicitation (server requested user input).

Fields

§request_id: String

Request ID.

§schema: String

Schema type (text, select, confirm, etc.).

§

McpUrlElicitation

MCP URL elicitation (OAuth, payments).

Fields

§url: String

URL presented to user.

§interaction_type: String

Interaction type (oauth, payment, verification, custom).

§

McpSampling

MCP sampling (server-initiated LLM call).

Fields

§model: String

Model used.

§prompt_tokens: usize

Prompt token count.

§

FileRead

File was read.

Fields

§path: String

File path.

§

FileWrite

File was written.

Fields

§path: String

File path.

§content_hash: ContentHash

Hash of the written content.

§

FileDelete

File was deleted.

Fields

§path: String

File path.

§

CapabilityCreated

Capability token was created.

Fields

§token_id: TokenId

Token ID.

§resource: String

Resource pattern.

§permissions: Vec<Permission>

Permissions granted.

§scope: ApprovalScope

Token scope.

§

CapabilityRevoked

Capability token was revoked.

Fields

§token_id: TokenId

Token ID.

§reason: String

Reason for revocation.

§

ApprovalRequested

Approval was requested from the user.

Fields

§action_type: String

Type of action being requested.

§resource: String

Resource being accessed.

§risk_level: RiskLevel

Risk level of the action.

§

ApprovalGranted

User granted approval.

Fields

§action: String

What was approved.

§resource: Option<String>

Resource being accessed.

§scope: ApprovalScope

Scope of approval.

§

ApprovalDenied

User denied approval.

Fields

§action: String

What was denied.

§reason: Option<String>

Reason given.

§

SessionStarted

Session started.

Fields

§user_id: [u8; 8]

User ID (key ID bytes).

§platform: String

Platform the session started from.

§

SessionEnded

Session ended.

Fields

§reason: String

Reason for ending.

§duration_secs: u64

Duration in seconds.

§

ContextSummarized

Context was summarized (messages evicted).

Fields

§evicted_count: usize

Number of messages evicted.

§tokens_freed: usize

Approximate tokens freed.

§

LlmRequest

LLM request was made.

Fields

§model: String

Model used.

§input_tokens: usize

Input token count.

§output_tokens: usize

Output token count.

§

ServerStarted

Server was started.

Fields

§name: String

Server name.

§transport: String

Transport type.

§binary_hash: Option<ContentHash>

Binary hash (if verified).

§

ServerStopped

Server was stopped.

Fields

§name: String

Server name.

§reason: String

Reason.

§

ElicitationSent

Elicitation request sent to user.

Fields

§request_id: String

Request ID.

§server: String

Server requesting.

§elicitation_type: String

Type of elicitation.

§

ElicitationReceived

Elicitation response received.

Fields

§request_id: String

Request ID.

§action: String

Action taken (submit/cancel/dismiss).

§

SecurityViolation

Security policy violation detected.

Fields

§violation_type: String

Type of violation.

§details: String

Details.

§risk_level: RiskLevel

Risk level.

§

SubAgentSpawned

Sub-agent was spawned (parent→child linkage).

Fields

§parent_session_id: String

Parent session ID.

§child_session_id: String

Child session ID.

§description: String

Task description.

§

ConfigReloaded

Configuration was reloaded.

Implementations§

Source§

impl AuditAction

Source

pub fn description(&self) -> String

Get a human-readable description of the action.

Trait Implementations§

Source§

impl Clone for AuditAction

Source§

fn clone(&self) -> AuditAction

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AuditAction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for AuditAction

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for AuditAction

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,