Skip to main content

PlanningView

Struct PlanningView 

Source
pub struct PlanningView {
Show 17 fields pub goal: String, pub budget: PlanningBudget, pub screen: PlanningScreen, pub elements: Vec<PlanningElement>, pub adapter_facts: Vec<AdapterFactRef>, pub adapter_actions: Vec<AdapterActionRef>, pub capabilities: Vec<CapabilityRef>, pub run_progress: RunProgress, pub memories: Vec<MemoryRef>, pub knowledge: Vec<KnowledgeRef>, pub recent_events: Vec<EventRef>, pub blockers: Vec<Blocker>, pub anomalies: Vec<AnomalyRef>, pub evidence: Vec<EvidenceRef>, pub selection_rationale: Option<String>, pub omitted_counts: OmittedCounts, pub adapter_actions_prompt: Option<String>,
}
Expand description

Compact, budgeted projection of CEL state for one planner call.

Built by cel-cortex’s planning-view builder from MentalModel plus active adapter facts. Consumed by every planner — built-in or external — instead of raw ScreenContext.

Fields§

§goal: String

The natural-language goal the planner is working on.

§budget: PlanningBudget

The budget the caller asked the builder to respect.

§screen: PlanningScreen

Current screen / app / window summary.

§elements: Vec<PlanningElement>

Selected elements relevant to the goal, after budget compression.

§adapter_facts: Vec<AdapterFactRef>

Active adapter-backed facts (Numbers cells, browser DOM facts, etc.). Empty until adapters expose typed facts; in PR1a builders may leave this empty if no adapter contributed.

§adapter_actions: Vec<AdapterActionRef>

Active adapter-backed actions available for this turn. This is the structured, agent-agnostic contract; LLM planners may render it into prompt text, while non-LLM agents can inspect it directly.

§capabilities: Vec<CapabilityRef>

Capabilities currently wired up (CDP bound, native input enabled, …). Folds in the boolean flags from the legacy RuntimeCaps.

§run_progress: RunProgress

Where in the run the planner is. Lets the planner pace itself — e.g. stop polishing extraction once most of the budget is spent. Folds in the legacy RuntimeCaps::steps_used / max_steps.

§memories: Vec<MemoryRef>

Memories selected by the cognition layer (PR3).

§knowledge: Vec<KnowledgeRef>

Knowledge records selected by the cognition layer (PR3).

§recent_events: Vec<EventRef>

Recent events / actions / checkpoints relevant to the goal.

§blockers: Vec<Blocker>

Things actively blocking forward progress (consent walls, modal dialogs, missing capability, etc.). Promoted to first-class so the planner notices them even if elements are aggressively compressed.

§anomalies: Vec<AnomalyRef>

Anomalies the cortex flagged (stale state, unexpected window, etc.).

§evidence: Vec<EvidenceRef>

References back to source records that explain why selection picked what it picked. Filled when a memory / failure / prior outcome influenced the view.

§selection_rationale: Option<String>

One-sentence rationale explaining the selection. Optional — deterministic selectors may leave this absent.

§omitted_counts: OmittedCounts

What the builder dropped to fit the budget. Lets the planner know the view is compressed and how aggressively.

§adapter_actions_prompt: Option<String>

Transitional pre-rendered “App-Specific Actions” prompt fragment listing the {"type": "custom", "adapter": "...", "action": "...", "params": {...}} shapes for every currently-active adapter. The cortex-side step executor builds this once per turn from Cortex::active_adapter_manifests() and the canonical runner stamps it onto the view post-build. None means no adapter actions are available to the planner this turn — empty equivalent. Prefer adapter_actions for new callers; this field is retained while prompt-only clients migrate.

Trait Implementations§

Source§

impl Clone for PlanningView

Source§

fn clone(&self) -> PlanningView

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 PlanningView

Source§

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

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

impl<'de> Deserialize<'de> for PlanningView

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 PlanningView

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.