Skip to main content

Event

Enum Event 

Source
pub enum Event {
Show 36 variants Snapshot { state: Box<State>, }, SessionStarted { session: Session, }, SessionStatus { session: SessionId, status: SessionStatus, }, SessionContext { session: SessionId, used: u64, window: Option<u64>, }, QuotaUpdated { quota: Quota, }, SessionLimited { session: SessionId, detail: String, }, SessionRemoved { session: SessionId, }, ArchivePruned { sessions: Vec<SessionId>, }, SessionModel { session: SessionId, model: String, }, SessionCommands { session: SessionId, commands: Vec<String>, }, SessionEffort { session: SessionId, effort: String, }, SessionNativeId { session: SessionId, native_id: String, }, SessionCleared { session: SessionId, }, SessionLabel { session: SessionId, label: String, }, SessionNote { session: SessionId, note: String, }, SessionHandedOff { from: SessionId, to: SessionId, }, UserPrompt { session: SessionId, text: String, from: Option<String>, }, Output { session: SessionId, text: String, }, OutputAppend { session: SessionId, text: String, }, InboxRead { session: SessionId, msg: String, }, SessionBgProcs { session: SessionId, procs: Vec<BgProc>, }, ToolCall { session: SessionId, name: String, input: String, ok: Option<bool>, output: Option<String>, }, PermissionRequested { request: PermissionRequest, }, PermissionResolved { session: SessionId, req: String, decision: Decision, }, QuestionRequested { question: UserQuestion, }, QuestionResolved { session: SessionId, id: String, answers: Vec<String>, }, BusMessage { message: BusMessage, }, TaskChanged { task: Task, }, ArtifactShared { artifact: Artifact, }, ReviewCommented { review: ReviewComment, }, SessionExited { session: SessionId, code: Option<i32>, }, Cost { session: SessionId, cost: Cost, }, SessionOverBudget { session: SessionId, spent: f64, limit: f64, }, SessionBudget { session: SessionId, budget_usd: Option<f64>, }, LogHealth { ok: bool, }, QueueChanged { session: SessionId, items: Vec<String>, },
}
Expand description

System events. Append-only, serializable, replayable.

Variants§

§

Snapshot

Complete state written to first line of new log file after rotation; replay begins from here. seq inherits value from rotation time.

Fields

§state: Box<State>
§

SessionStarted

Fields

§session: Session
§

SessionStatus

Fields

§session: SessionId
§

SessionContext

Agent reports session context usage.

Fields

§session: SessionId
§used: u64
§window: Option<u64>
§

QuotaUpdated

Agent reports account quota (usage percentage and reset time).

Fields

§quota: Quota
§

SessionLimited

Agent reports quota exhausted / rate limited (can hand off to other agents).

Fields

§session: SessionId
§detail: String
§

SessionRemoved

Session removed from list (startup failure or user cleared terminated session).

Fields

§session: SessionId
§

ArchivePruned

Archived sessions dropped by retention (count or age limit).

Fields

§sessions: Vec<SessionId>
§

SessionModel

Actual model reported by agent (or specified in settings).

Fields

§session: SessionId
§model: String
§

SessionCommands

Native slash commands reported by agent.

Fields

§session: SessionId
§commands: Vec<String>
§

SessionEffort

Reasoning effort switched at runtime (or configured at startup).

Fields

§session: SessionId
§effort: String
§

SessionNativeId

Native conversation ID reported by agent (for resumption).

Fields

§session: SessionId
§native_id: String
§

SessionCleared

Context reset (Request::Clear): the agent restarts with a fresh native conversation under the same ertangle session id. Drops native id, cost, context, transcript and live tool state.

Fields

§session: SessionId
§

SessionLabel

Fields

§session: SessionId
§label: String
§

SessionNote

Short status note updated by agent via ertangle_status.

Fields

§session: SessionId
§note: String
§

SessionHandedOff

Handoff complete: to takes over work from from (bus messages are routed to successor).

Fields

§

UserPrompt

Prompt sent to agent (displayed in transcript for conversational context).

Fields

§session: SessionId
§text: String
§from: Option<String>

Sender: None = user; otherwise sender agent session ID, or PROMPT_FROM_ERTANGLE (daemon-generated reminders, notifications, and handoff briefs).

§

Output

Text output from agent (streaming chunk or complete line).

Fields

§session: SessionId
§text: String
§

OutputAppend

Continuation of an unterminated Event::Output line: the first segment of text is appended to the last transcript line instead of starting a new one.

Fields

§session: SessionId
§text: String
§

InboxRead

A session’s inbox read cursor advanced to msg (persisted so restarts do not redeliver).

Fields

§session: SessionId
§

SessionBgProcs

Session background child process list updated.

Fields

§session: SessionId
§procs: Vec<BgProc>
§

ToolCall

Fields

§session: SessionId
§name: String
§input: String
§ok: Option<bool>

None = in progress; Some(true/false) = completed with success/failure.

§output: Option<String>
§

PermissionRequested

Fields

§

PermissionResolved

Fields

§session: SessionId
§decision: Decision
§

QuestionRequested

Fields

§question: UserQuestion
§

QuestionResolved

Fields

§session: SessionId
§answers: Vec<String>
§

BusMessage

Fields

§message: BusMessage
§

TaskChanged

Fields

§task: Task
§

ArtifactShared

Fields

§artifact: Artifact
§

ReviewCommented

Fields

§

SessionExited

Fields

§session: SessionId
§code: Option<i32>
§

Cost

Fields

§session: SessionId
§cost: Cost
§

SessionOverBudget

Session reached cost limit (interrupted current turn and set over_budget to true).

Fields

§session: SessionId
§spent: f64
§limit: f64
§

SessionBudget

Manually adjusted session cost limit (also clears over_budget).

Fields

§session: SessionId
§budget_usd: Option<f64>
§

LogHealth

Event log write health status (ok == false indicates write failure, TUI displays log ✗).

Fields

§ok: bool
§

QueueChanged

Session queued prompts changed (items contains raw input text list, excluding attachment content).

Fields

§session: SessionId
§items: Vec<String>

Trait Implementations§

Source§

impl Clone for Event

Source§

fn clone(&self) -> Self

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<'de> Deserialize<'de> for Event

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 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 Forget for Event

§

impl Freeze for Event

§

impl Move 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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.