Skip to main content

ObservationKindV1

Enum ObservationKindV1 

Source
pub enum ObservationKindV1 {
Show 34 variants SourceCapabilities { source_family: ObservationSourceFamilyV1, source_adapter: String, capabilities: ObservationCapabilitiesV1, }, SessionStarted, Ready, Stopped, Exited { success: Option<bool>, }, TurnStarted, Working, TurnCompleted, TurnInterrupted, ToolStarted { correlation_id: String, class: String, }, ToolCompleted { correlation_id: String, class: String, success: bool, duration_ms: Option<u64>, }, ApprovalRequested { correlation_id: String, tool_class: String, }, QuestionRequested { correlation_id: String, tool_class: String, }, ApprovalResolved { correlation_id: String, outcome: ObservationInteractionOutcomeV1, }, QuestionResolved { correlation_id: String, outcome: ObservationInteractionOutcomeV1, }, InteractionResolved { correlation_id: String, outcome: ObservationInteractionOutcomeV1, }, SubagentStarted { correlation_id: String, class: String, }, SubagentProgress { correlation_id: String, }, SubagentCompleted { correlation_id: String, success: Option<bool>, }, TodoSnapshot { revision: u64, items: Vec<ObservationTodoItemV1>, complete: bool, }, Usage { input_tokens: u64, output_tokens: u64, cache_read_tokens: u64, cache_write_tokens: u64, reasoning_tokens: u64, context_window: Option<u64>, is_cumulative: bool, }, ContextWindowUsage { uncached_input_tokens: Option<u64>, cache_read_tokens: Option<u64>, cache_write_tokens: Option<u64>, output_tokens: Option<u64>, unattributed_tokens: Option<u64>, used_tokens: u64, capacity_tokens: u64, }, RateLimited, HostRequestObserved { class: String, decision: HostRequestDecisionV1, outcome: HostRequestOutcomeV1, }, ActionBlocked { correlation_id: Option<String>, tool_class: String, authority: BlockAuthorityV1, reason_kind: Option<String>, reason: String, help: Option<String>, }, UnrecognizedNotification { method: String, }, OwnedProcessStarted { correlation_id: String, class: String, }, OwnedProcessExited { correlation_id: String, success: Option<bool>, exit_code: Option<i32>, }, FileChanged { path: Option<String>, }, HistorySnapshot { message_count: u64, message_count_exact: bool, completed_turn_count: Option<u64>, total_tokens: Option<u64>, }, Gap { missed: u64, }, SourceReset, Stale, Error { detail: String, },
}

Variants§

§

SourceCapabilities

Fields

§source_adapter: String
§

SessionStarted

§

Ready

§

Stopped

§

Exited

Fields

§success: Option<bool>
§

TurnStarted

§

Working

§

TurnCompleted

§

TurnInterrupted

§

ToolStarted

Fields

§correlation_id: String
§class: String
§

ToolCompleted

Fields

§correlation_id: String
§class: String
§success: bool
§duration_ms: Option<u64>
§

ApprovalRequested

Fields

§correlation_id: String
§tool_class: String
§

QuestionRequested

Fields

§correlation_id: String
§tool_class: String
§

ApprovalResolved

Fields

§correlation_id: String
§

QuestionResolved

Fields

§correlation_id: String
§

InteractionResolved

Fields

§correlation_id: String
§

SubagentStarted

Fields

§correlation_id: String
§class: String
§

SubagentProgress

Fields

§correlation_id: String
§

SubagentCompleted

Fields

§correlation_id: String
§success: Option<bool>
§

TodoSnapshot

Fields

§revision: u64
§complete: bool
§

Usage

Fields

§input_tokens: u64
§output_tokens: u64
§cache_read_tokens: u64
§cache_write_tokens: u64
§reasoning_tokens: u64
§context_window: Option<u64>
§is_cumulative: bool
§

ContextWindowUsage

Fields

§uncached_input_tokens: Option<u64>

Cache/segment breakdown of used_tokens. None when the source only reported used_tokens/capacity_tokens and never observed how the total decomposes – see ProviderEvent:: UsageUpdated. Never defaulted to zero: a zero would assert a segment was observed to be empty when it was never observed at all.

§cache_read_tokens: Option<u64>
§cache_write_tokens: Option<u64>
§output_tokens: Option<u64>
§unattributed_tokens: Option<u64>
§used_tokens: u64
§capacity_tokens: u64
§

RateLimited

§

HostRequestObserved

The agent asked the ACP host for something (session/request_ permission, fs/read_text_file, fs/write_text_file, terminal/ create, terminal/output, terminal/wait_for_exit, terminal/ kill, terminal/release). class is a coarse bucket of the ACP method requested – the same scale as ToolStarted::class – never the raw request parameters: what path was read or what command ran is never carried on this wire. decision is HostRequestDecisionV1:: Deferred when the request has arrived but nothing has decided it yet (only reachable for session/request_permission); a later observation for the same underlying request reports the eventual Granted/Denied outcome once one exists.

Fields

§class: String
§outcome: HostRequestOutcomeV1

Whether an authorized (Granted) request actually ran cleanly or failed doing so – see HostRequestOutcomeV1’s own doc comment for why this is a separate field from decision rather than a third flavor of Denied. Always Executed for Denied/ Deferred (nothing ran to fail). #[serde(default)] reads a durable record written before this field existed (K1d) as Executed – honest, since before this field existed an observed HostRequestObserved implied a Granted request had run, and there was nothing else it could have meant.

§

ActionBlocked

Something the agent tried was blocked mid-turn – by this harness’s own gate/policy/deadline, by an operator, or by the provider itself (a classifier, a permission rule, a sandbox, a plain refusal, a hook, or the provider’s own user-rejected outcome). correlation_id is the tool call this block belongs to, when there is one, using the SAME opaque id scheme ToolStarted::correlation_id does – None when the block has no tool call to correlate against yet (an operator/policy denial today never does; a provider-side block wired up later may). tool_class is the same coarse bucket ToolStarted::class/ HostRequestObserved::class use, never the raw command. authority is read off a typed field or this harness’s own decision, NEVER guessed from text – see BlockAuthorityV1’s doc comment. reason_kind is the source’s own machine code for why (ACP’s nonExecutionKind, a provider’s decision_reason_type, a stopReason), when one exists. reason and help are bounded, verbatim free text – never summarised or rewritten – and are a SEPARATE contract from Error::detail, which stays a categorical slug; see this crate’s module doc comment for why a sentence must never travel through that field.

Fields

§correlation_id: Option<String>
§tool_class: String
§reason_kind: Option<String>
§reason: String
§

UnrecognizedNotification

A JSON-RPC notification the reader received but could not classify into any other kind here – the protocol said something this build does not parse. method is the bare JSON-RPC method string (a small, protocol-defined vocabulary), never the notification’s own payload.

Fields

§method: String
§

OwnedProcessStarted

Fields

§correlation_id: String
§class: String
§

OwnedProcessExited

Fields

§correlation_id: String
§success: Option<bool>
§exit_code: Option<i32>
§

FileChanged

Fields

§

HistorySnapshot

Fields

§message_count: u64
§message_count_exact: bool
§completed_turn_count: Option<u64>
§total_tokens: Option<u64>
§

Gap

Fields

§missed: u64
§

SourceReset

§

Stale

§

Error

Fields

§detail: String

Implementations§

Trait Implementations§

Source§

impl Clone for ObservationKindV1

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 ObservationKindV1

Source§

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

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

impl<'de> Deserialize<'de> for ObservationKindV1

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 Eq for ObservationKindV1

Source§

impl PartialEq for ObservationKindV1

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for ObservationKindV1

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
Source§

impl StructuralPartialEq for ObservationKindV1

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.