Skip to main content

Event

Enum Event 

Source
pub enum Event {
    OpenAtomcode,
    LlmChat {
Show 14 fields duration_ms: u32, tool_calls_count: u32, input_tokens: u32, output_tokens: u32, cached_tokens: u32, had_error: bool, context_window: u32, system_tokens: u32, tool_def_tokens: u32, tool_result_tokens: u32, message_tokens: u32, messages_count: u32, error_kind: Option<LlmErrorKind>, error_data: Option<String>,
}, ToolCall { name: String, success: bool, duration_ms: u32, error_kind: Option<ToolErrorKind>, error_data: Option<String>, }, UseCommand { type_: String, success: Option<bool>, error_kind: Option<UseCommandErrorKind>, error_data: Option<String>, }, McpConnect { server_name: String, transport: McpTransport, success: bool, duration_ms: Option<u32>, error_kind: Option<McpErrorKind>, error_data: Option<String>, }, LoginSuccess, TakeCodingplan { type_: CodingplanResult, error_kind: Option<CodingplanErrorKind>, error_data: Option<String>, }, Panic { location: String, message_head: String, thread: String, backtrace_top_5: Vec<String>, error_kind: Option<String>, error_data: Option<String>, }, TelemetryDisabled, CodingplanOfficialBuildRequired, }

Variants§

§

OpenAtomcode

Fired when AtomCode is launched (interactive CLI, oneshot, or TUI entry). Not fired for –version / –help / telemetry subcommands.

§

LlmChat

One LLM turn completed (success or failure).

Fields

§duration_ms: u32
§tool_calls_count: u32
§input_tokens: u32
§output_tokens: u32
§cached_tokens: u32
§had_error: bool
§context_window: u32
§system_tokens: u32
§tool_def_tokens: u32
§tool_result_tokens: u32
§message_tokens: u32
§messages_count: u32
§error_kind: Option<LlmErrorKind>

Error category (None when had_error=false or unclassifiable).

§error_data: Option<String>

Error detail JSON (None when had_error=false).

§

ToolCall

Single tool call result (success or failure).

Fields

§name: String

Tool name (e.g. “bash”, “edit_file”, “mcp__xx__yy”).

§success: bool

Whether the call succeeded.

§duration_ms: u32

Execution duration in ms (0 if not executed).

§error_kind: Option<ToolErrorKind>

Error category (None when success=true).

§error_data: Option<String>

Error/detail JSON (always present for diagnostics even on success).

§

UseCommand

A slash command was executed in TUI or daemon. type_ is the literal command name (without the leading /).

Fields

§type_: String
§success: Option<bool>

Whether the command succeeded (None for legacy events).

§error_kind: Option<UseCommandErrorKind>

Error category (None when success=true or legacy).

§error_data: Option<String>

Error/detail JSON.

§

McpConnect

MCP server connection attempt (success or failure).

Fields

§server_name: String

MCP server name.

§transport: McpTransport

Transport type.

§success: bool

Whether the connection succeeded.

§duration_ms: Option<u32>

Connection duration in ms.

§error_kind: Option<McpErrorKind>

Error category (None when success=true).

§error_data: Option<String>

Error/detail JSON.

§

LoginSuccess

OAuth login completed successfully.

§

TakeCodingplan

A coding plan run finished.

Fields

§error_kind: Option<CodingplanErrorKind>

Error category (None when type_=Success).

§error_data: Option<String>

Error/detail JSON.

§

Panic

Panic captured by global hook.

Fields

§location: String
§message_head: String
§thread: String
§backtrace_top_5: Vec<String>
§error_kind: Option<String>

Fixed to “panic”.

§error_data: Option<String>

Runtime context JSON (session_duration_secs, turns_completed, last_tool_name, last_event).

§

TelemetryDisabled

Final event before user opts out via atomcode telemetry disable. Only fired if telemetry was currently enabled at the time of the command.

§

CodingplanOfficialBuildRequired

Reserved variant. Will be fired (in a future PR) when an open-source build of AtomCode attempts to send a request to the AtomGit LLM gateway. Locking the wire-format event_id here keeps the firing-site PR small.

Trait Implementations§

Source§

impl Clone for Event

Source§

fn clone(&self) -> Event

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Event

Source§

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

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

impl Serialize for Event

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§

§

impl Freeze for Event

§

impl RefUnwindSafe for Event

§

impl Send for Event

§

impl Sync for Event

§

impl Unpin for Event

§

impl UnsafeUnpin for Event

§

impl UnwindSafe for Event

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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
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<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