ToolCall.Audit.Entry (ToolCall v0.4.0)

Copy Markdown

One dispatch attempt.

outcome is :ok, :error, :raised, :pending, :denied, :timeout, :invalid_arguments or :unknown_tool. duration_us covers the phase that produced the outcome: resolve for an argument error, execute for an invoked call, and zero for an unknown tool or non-map arguments. Policy exceptions and invalid runtime IR use the phase that raised; this is not a total dispatch latency. error carries the reason for failure outcomes and approval_request_id correlates a pending request (a resumed execution has no request id unless the caller passes it in the context). The result value is never recorded.

Summary

Types

t()

@type t() :: %ToolCall.Audit.Entry{
  approval_request_id: String.t() | nil,
  args: term(),
  at: DateTime.t(),
  context: term(),
  duration_us: non_neg_integer() | nil,
  error: term(),
  id: String.t(),
  module: module(),
  outcome: ToolCall.Audit.outcome(),
  timeout: non_neg_integer() | nil,
  tool: String.t()
}