pub struct ContextPack {
pub context_pack_id: ContextPackId,
pub task: String,
pub max_tokens: usize,
pub pack_mode: PackMode,
pub redaction_policy: RedactionPolicy,
pub selected_refs: Vec<SelectedContextRef>,
pub active_doctrine_ids: Vec<DoctrineId>,
pub conflicts: Vec<PackConflict>,
pub exclusions: Vec<PackExclusion>,
pub selection_audit: SelectionAudit,
}Expand description
Bounded injection object with citations and exclusions.
Fields§
§context_pack_id: ContextPackIdContext pack id.
task: StringTask this pack was assembled for.
max_tokens: usizeMaximum token budget requested by caller.
pack_mode: PackModePack mode recorded per BUILD_SPEC §2.2.
redaction_policy: RedactionPolicyRedaction policy recorded per BUILD_SPEC §2.2.
selected_refs: Vec<SelectedContextRef>Selected memory/principle/event refs.
active_doctrine_ids: Vec<DoctrineId>Active promoted doctrine ids.
conflicts: Vec<PackConflict>Surfaced conflicts.
exclusions: Vec<PackExclusion>Explicit exclusions.
selection_audit: SelectionAuditSelection audit for included and excluded refs.
Implementations§
Source§impl ContextPack
impl ContextPack
Sourcepub fn contradiction_posture(&self) -> BoundaryContradictionState
pub fn contradiction_posture(&self) -> BoundaryContradictionState
Conservative posture for surfaced contradiction state.
Sourcepub fn policy_decision(&self) -> PolicyDecision
pub fn policy_decision(&self) -> PolicyDecision
Derive the ADR 0026 policy decision for this built pack.
Sourcepub fn require_default_use_allowed(&self) -> CoreResult<()>
pub fn require_default_use_allowed(&self) -> CoreResult<()>
Fail closed before using this pack in the default external/trusted path.
Building a pack may still be useful for diagnostics, but default
consumers must not silently use a pack whose composed policy is
Reject or Quarantine.
Trait Implementations§
Source§impl Clone for ContextPack
impl Clone for ContextPack
Source§fn clone(&self) -> ContextPack
fn clone(&self) -> ContextPack
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContextPack
impl Debug for ContextPack
Source§impl<'de> Deserialize<'de> for ContextPack
impl<'de> Deserialize<'de> for ContextPack
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 PartialEq for ContextPack
impl PartialEq for ContextPack
Source§fn eq(&self, other: &ContextPack) -> bool
fn eq(&self, other: &ContextPack) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ContextPack
impl Serialize for ContextPack
impl StructuralPartialEq for ContextPack
Auto Trait Implementations§
impl Freeze for ContextPack
impl RefUnwindSafe for ContextPack
impl Send for ContextPack
impl Sync for ContextPack
impl Unpin for ContextPack
impl UnsafeUnpin for ContextPack
impl UnwindSafe for ContextPack
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more