Skip to main content

RuntimeEvent

Enum RuntimeEvent 

Source
pub enum RuntimeEvent {
    Wire {
        agent_id: String,
        outbound: bool,
        lines: Vec<String>,
    },
    Inbound {
        agent_id: String,
        lines: Vec<String>,
    },
    Outbound {
        agent_id: String,
        line: String,
        session_id: Option<String>,
        sequence: Option<u64>,
    },
    Stderr {
        agent_id: String,
        line: String,
    },
    Exit {
        agent_id: String,
    },
    RunStates {
        sessions: Vec<SessionRunState>,
    },
    AcpNotification {
        agent_id: String,
        method: String,
        params: Value,
        session_id: Option<String>,
        sequence: Option<u64>,
    },
    AcpAgentRequest {
        agent_id: String,
        id: Value,
        method: String,
        params: Value,
        session_id: Option<String>,
        sequence: Option<u64>,
    },
}

Variants§

§

Wire

stdio protocol diagnostics; params of outbound providers/set and auth/login are redacted. The engine receives the raw secret params; observers and replay records never see them.

Fields

§agent_id: String
§outbound: bool
§lines: Vec<String>
§

Inbound

ACP frames output by the agent (agent -> app), batched every 16ms, each already carrying the _alwithRuntime envelope.

Fields

§agent_id: String
§lines: Vec<String>
§

Outbound

A frame the app sent to the agent. Frames entering the session journal carry session_id and sequence (see AcpNotification).

Fields

§agent_id: String
§line: String
§session_id: Option<String>
§sequence: Option<u64>
§

Stderr

Fields

§agent_id: String
§line: String
§

Exit

The agent process has been reaped. There is never a second process running under the same agentId (start rejects while it is alive), so this event is unambiguous: receiving it means “my agent is gone”.

Fields

§agent_id: String
§

RunStates

Fields

§

AcpNotification

ACP notification from the agent (session/update etc.), already unframed by Runtime; coexists with the same frame in inbound.

Frames that entered the session journal carry session_id and sequence (same number as the same frame in sessionEvents): the client uses it to detect missed frames (a sequence gap) and refill via sessionEvents. Frames not journaled have neither field.

Fields

§agent_id: String
§method: String
§params: Value
§session_id: Option<String>
§sequence: Option<u64>
§

AcpAgentRequest

ACP request from the agent (session/request_permission, elicitation/create, fs/*…), the app answers with acpRespond using the same id. Sequence fields as in AcpNotification.

Fields

§agent_id: String
§method: String
§params: Value
§session_id: Option<String>
§sequence: Option<u64>

Trait Implementations§

Source§

impl Clone for RuntimeEvent

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 RuntimeEvent

Source§

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

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

impl<'de> Deserialize<'de> for RuntimeEvent

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 RuntimeEvent

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> 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.