pub struct ContextPackage {
pub trajectory_id: TrajectoryId,
pub scope_id: ScopeId,
pub user_input: Option<String>,
pub relevant_notes: Vec<Note>,
pub recent_artifacts: Vec<Artifact>,
pub working_set_entries: Vec<AgentWorkingSetEntry>,
pub graph_links: Vec<GraphLink>,
pub conversation_turns: Vec<Turn>,
pub scope_summaries: Vec<ScopeSummary>,
pub trajectory_hierarchy: Vec<Trajectory>,
pub session_markers: SessionMarkers,
pub kernel_config: Option<KernelConfig>,
}Expand description
Context package - all inputs for assembly. Similar to ContextPackage in the TypeScript CRM pattern.
Fields§
§trajectory_id: TrajectoryIdTrajectory this context belongs to
scope_id: ScopeIdScope this context belongs to
user_input: Option<String>Current user query/input
relevant_notes: Vec<Note>Relevant notes (semantic memory)
recent_artifacts: Vec<Artifact>Recent artifacts from current trajectory
working_set_entries: Vec<AgentWorkingSetEntry>Agent working-set entries (ephemeral workbench memory)
graph_links: Vec<GraphLink>Graph-derived context hints (adjacency projection)
conversation_turns: Vec<Turn>Conversation turns (ephemeral buffer)
scope_summaries: Vec<ScopeSummary>Scope summaries (compressed history)
trajectory_hierarchy: Vec<Trajectory>Trajectory hierarchy (parent chain for context inheritance)
session_markers: SessionMarkersSession markers (active context)
kernel_config: Option<KernelConfig>Kernel/persona configuration
Implementations§
Source§impl ContextPackage
impl ContextPackage
Sourcepub fn new(trajectory_id: TrajectoryId, scope_id: ScopeId) -> Self
pub fn new(trajectory_id: TrajectoryId, scope_id: ScopeId) -> Self
Create a new context package with required fields.
Sourcepub fn with_user_input(self, input: String) -> Self
pub fn with_user_input(self, input: String) -> Self
Set the user input.
Sourcepub fn with_notes(self, notes: Vec<Note>) -> Self
pub fn with_notes(self, notes: Vec<Note>) -> Self
Add relevant notes.
Sourcepub fn with_artifacts(self, artifacts: Vec<Artifact>) -> Self
pub fn with_artifacts(self, artifacts: Vec<Artifact>) -> Self
Add recent artifacts.
Sourcepub fn with_working_set(self, entries: Vec<AgentWorkingSetEntry>) -> Self
pub fn with_working_set(self, entries: Vec<AgentWorkingSetEntry>) -> Self
Add working-set entries.
Sourcepub fn with_graph_links(self, links: Vec<GraphLink>) -> Self
pub fn with_graph_links(self, links: Vec<GraphLink>) -> Self
Add graph links.
Sourcepub fn with_turns(self, turns: Vec<Turn>) -> Self
pub fn with_turns(self, turns: Vec<Turn>) -> Self
Add conversation turns.
Sourcepub fn with_hierarchy(self, hierarchy: Vec<Trajectory>) -> Self
pub fn with_hierarchy(self, hierarchy: Vec<Trajectory>) -> Self
Add trajectory hierarchy (parent chain).
Sourcepub fn with_session_markers(self, markers: SessionMarkers) -> Self
pub fn with_session_markers(self, markers: SessionMarkers) -> Self
Set session markers.
Sourcepub fn with_kernel_config(self, config: KernelConfig) -> Self
pub fn with_kernel_config(self, config: KernelConfig) -> Self
Set kernel config.
Sourcepub fn outline(&self) -> ContextOutline
pub fn outline(&self) -> ContextOutline
Produce a lightweight outline for progressive disclosure.
Trait Implementations§
Source§impl Clone for ContextPackage
impl Clone for ContextPackage
Source§fn clone(&self) -> ContextPackage
fn clone(&self) -> ContextPackage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more