Struct ContextPackage
Source 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) -> ContextPackage
pub fn new(trajectory_id: TrajectoryId, scope_id: ScopeId) -> ContextPackage
Create a new context package with required fields.
Sourcepub fn with_user_input(self, input: String) -> ContextPackage
pub fn with_user_input(self, input: String) -> ContextPackage
Set the user input.
Sourcepub fn with_notes(self, notes: Vec<Note>) -> ContextPackage
pub fn with_notes(self, notes: Vec<Note>) -> ContextPackage
Add relevant notes.
Sourcepub fn with_artifacts(self, artifacts: Vec<Artifact>) -> ContextPackage
pub fn with_artifacts(self, artifacts: Vec<Artifact>) -> ContextPackage
Add recent artifacts.
Sourcepub fn with_working_set(
self,
entries: Vec<AgentWorkingSetEntry>,
) -> ContextPackage
pub fn with_working_set( self, entries: Vec<AgentWorkingSetEntry>, ) -> ContextPackage
Add working-set entries.
Sourcepub fn with_graph_links(self, links: Vec<GraphLink>) -> ContextPackage
pub fn with_graph_links(self, links: Vec<GraphLink>) -> ContextPackage
Add graph links.
Sourcepub fn with_turns(self, turns: Vec<Turn>) -> ContextPackage
pub fn with_turns(self, turns: Vec<Turn>) -> ContextPackage
Add conversation turns.
Sourcepub fn with_hierarchy(self, hierarchy: Vec<Trajectory>) -> ContextPackage
pub fn with_hierarchy(self, hierarchy: Vec<Trajectory>) -> ContextPackage
Add trajectory hierarchy (parent chain).
Sourcepub fn with_session_markers(self, markers: SessionMarkers) -> ContextPackage
pub fn with_session_markers(self, markers: SessionMarkers) -> ContextPackage
Set session markers.
Sourcepub fn with_kernel_config(self, config: KernelConfig) -> ContextPackage
pub fn with_kernel_config(self, config: KernelConfig) -> ContextPackage
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