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
SessionStarted
Ready
Stopped
Exited
TurnStarted
Working
TurnCompleted
TurnInterrupted
ToolStarted
ToolCompleted
ApprovalRequested
QuestionRequested
ApprovalResolved
QuestionResolved
InteractionResolved
SubagentStarted
SubagentProgress
SubagentCompleted
TodoSnapshot
Usage
Fields
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.
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
decision: HostRequestDecisionV1outcome: HostRequestOutcomeV1Whether 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
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.