Skip to main content

KernelObservation

Enum KernelObservation 

Source
pub enum KernelObservation {
Show 23 variants Compressed { action: KernelPressureAction, rho_after: f64, summary: Option<String>, archived: Vec<Message>, invalidates_prefix_at: Option<usize>, }, Renewed { sprint: u32, }, Rollbacked { turn: u32, checkpoint_history_len: u32, reason: Option<RollbackReason>, }, CapabilityChanged { turn: u32, added: Vec<String>, removed: Vec<String>, change_kind: Option<String>, capability_id: Option<String>, version: Option<String>, mounted_by: Option<String>, mount_reason: Option<String>, }, MilestoneAdvanced { turn: u32, phase_id: String, capabilities_unlocked: Vec<String>, }, MilestoneBlocked { turn: u32, phase_id: String, reason: String, }, MilestoneEvidence { turn: u32, phase_id: String, evidence: Vec<String>, }, CheckpointTaken { turn: u32, history_len: u32, }, AgentProcessChanged { turn: u32, agent_id: String, parent_session_id: String, role: String, isolation: String, context_inheritance: String, state: String, permitted_capability_ids: Vec<String>, result_termination: Option<String>, }, WorkflowBatchSpawned { turn: u32, nodes: Vec<WorkflowSpawnInfo>, budget: Option<WorkflowBudget>, }, WorkflowCompleted { turn: u32, completed: Vec<String>, failed: Vec<String>, }, AgentPreempted { turn: u32, agent_ids: Vec<String>, reason: String, }, ToolGated { turn: u32, call_id: String, tool: String, reason: String, }, SignalDisposed { turn: u32, signal_id: String, disposition: String, queue_depth: u32, }, BudgetExceeded { turn: u32, budget: String, }, Suspended { turn: u32, reason: String, pending_calls: Vec<String>, }, Resumed { turn: u32, approved: Vec<String>, denied: Vec<String>, }, PageOut { turn: u32, action: KernelPressureAction, rho_after: f64, summary: Option<String>, archived: Vec<Message>, tier_hint: String, }, PageInRequested { turn: u32, call_id: String, tool: String, query: String, top_k: u32, }, MemoryWritten { turn: u32, memory_id: String, memory_kind: String, size_bytes: u32, }, MemoryValidationFailed { turn: u32, memory_id: String, error: String, }, MemoryQueried { turn: u32, query_context: String, requested_k: usize, requires_async_response: bool, }, LargeResultSpooled { turn: u32, call_id: String, tool: String, original_size: u32, preview_size: u32, spool_ref: Option<String>, },
}

Variants§

§

Compressed

Fields

§rho_after: f64
§summary: Option<String>
§archived: Vec<Message>
§invalidates_prefix_at: Option<usize>

W1-1 cache-awareness: the message index at which this compression invalidated the prompt cache prefix (if any). None = prefix-safe. SDK/telemetry can use this to quantify “tokens saved vs cache rebuild cost”. Additive ABI field with default.

§

Renewed

Fields

§sprint: u32
§

Rollbacked

Fields

§turn: u32
§checkpoint_history_len: u32
§

CapabilityChanged

Fields

§turn: u32
§added: Vec<String>
§removed: Vec<String>
§change_kind: Option<String>
§capability_id: Option<String>
§version: Option<String>
§mounted_by: Option<String>
§mount_reason: Option<String>
§

MilestoneAdvanced

Fields

§turn: u32
§phase_id: String
§capabilities_unlocked: Vec<String>
§

MilestoneBlocked

Fields

§turn: u32
§phase_id: String
§reason: String
§

MilestoneEvidence

Evidence collected by the verifier during milestone evaluation.

Fields

§turn: u32
§phase_id: String
§evidence: Vec<String>
§

CheckpointTaken

Checkpoint taken at the start of a turn transaction (before LLM call).

Fields

§turn: u32
§history_len: u32
§

AgentProcessChanged

Kernel process table changed for a spawned sub-agent.

Fields

§turn: u32
§agent_id: String
§parent_session_id: String
§role: String
§isolation: String
§context_inheritance: String
§state: String
§permitted_capability_ids: Vec<String>
§result_termination: Option<String>
§

WorkflowBatchSpawned

W0-ABI: a workflow batch was spawned — each node’s spawn descriptor (agent id + goal + role/isolation/inheritance) so the SDK can run the kernel-generated nodes.

Fields

§turn: u32
§budget: Option<WorkflowBudget>

G4 budget-as-signal: the workflow’s remaining headroom under the active quota at spawn time, so a coordinator node can scale its next submission. Additive: omitted when no resource quota is installed (nothing to report).

§

WorkflowCompleted

W0-ABI: a workflow finished (all nodes terminal, or stalled by a gated dependency).

Fields

§turn: u32
§completed: Vec<String>
§failed: Vec<String>
§

AgentPreempted

#2-B: a high-urgency InterruptNow signal preempted in-flight work. The kernel has already marked these agents Done(UserAbort) and reclaimed the root to reason about the interrupt; the SDK must ABORT the listed in-flight child runs and discard their results (do NOT feed their SubAgentCompleted). Additive variant (agent_preempted) — byte-identical for SDKs that never receive it.

Fields

§turn: u32
§agent_ids: Vec<String>
§reason: String
§

ToolGated

A tool call needs user approval (governance AskUser). Not blocked by the kernel — the SDK must obtain approval before executing the named call.

Fields

§turn: u32
§call_id: String
§tool: String
§reason: String
§

SignalDisposed

An inbound signal was routed by the in-kernel attention policy.

Fields

§turn: u32
§signal_id: String
§disposition: String
§queue_depth: u32
§

BudgetExceeded

A budget axis (turns / tokens / wall-time) was exhausted.

Fields

§turn: u32
§budget: String
§

Suspended

Loop entered Suspended state (awaiting human approval or sub-agent).

Fields

§turn: u32
§reason: String
§pending_calls: Vec<String>
§

Resumed

Loop resumed from Suspended state.

Fields

§turn: u32
§approved: Vec<String>
§denied: Vec<String>
§

PageOut

Working memory archived for long-term storage (page-out decision).

Fields

§turn: u32
§rho_after: f64
§summary: Option<String>
§archived: Vec<Message>
§tier_hint: String
§

PageInRequested

Kernel requests SDK to fetch long-term memory for a meta-tool call.

Fields

§turn: u32
§call_id: String
§tool: String
§query: String
§top_k: u32
§

MemoryWritten

Memory entry written successfully (Phase 7).

Fields

§turn: u32
§memory_id: String
§memory_kind: String
§size_bytes: u32
§

MemoryValidationFailed

Memory validation failed (Phase 7).

Fields

§turn: u32
§memory_id: String
§error: String
§

MemoryQueried

Memory query request (Phase 7).

Fields

§turn: u32
§query_context: String
§requested_k: usize
§requires_async_response: bool
§

LargeResultSpooled

Large tool result spooled (Layer 1).

Fields

§turn: u32
§call_id: String
§tool: String
§original_size: u32
§preview_size: u32
§spool_ref: Option<String>

Trait Implementations§

Source§

impl Clone for KernelObservation

Source§

fn clone(&self) -> KernelObservation

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 KernelObservation

Source§

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

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

impl<'de> Deserialize<'de> for KernelObservation

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 KernelObservation

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