pub struct GepCapsule {Show 19 fields
pub capsule_type: String,
pub schema_version: String,
pub id: String,
pub trigger: Vec<String>,
pub gene: String,
pub summary: String,
pub content: Option<CapsuleContent>,
pub diff: Option<String>,
pub strategy: Option<Vec<String>>,
pub confidence: f32,
pub blast_radius: BlastRadius,
pub outcome: CapsuleOutcome,
pub success_streak: Option<u32>,
pub env_fingerprint: Option<EnvFingerprint>,
pub model_name: Option<String>,
pub asset_id: String,
pub trigger_context: Option<TriggerContext>,
pub reused_asset_id: Option<String>,
pub source_type: CapsuleSourceType,
}Expand description
GEP-compatible Capsule definition
Fields§
§capsule_type: StringAsset type - always “Capsule”
schema_version: StringProtocol schema version
id: StringUnique identifier (e.g., capsule_1708123456789)
trigger: Vec<String>Signals that triggered this evolution
gene: StringID of the gene used
summary: StringHuman-readable description
content: Option<CapsuleContent>Structured description
diff: Option<String>Git diff of actual code changes
strategy: Option<Vec<String>>Ordered execution steps
confidence: f32Confidence 0.0-1.0
blast_radius: BlastRadiusBlast radius
outcome: CapsuleOutcomeOutcome
success_streak: Option<u32>Consecutive successes with this gene
env_fingerprint: Option<EnvFingerprint>Runtime environment snapshot
model_name: Option<String>LLM model that produced this capsule
asset_id: StringContent-addressable hash
trigger_context: Option<TriggerContext>Trigger context (optional)
reused_asset_id: Option<String>ID of reused capsule (if reused)
source_type: CapsuleSourceTypeSource type: generated, reused, or reference
Implementations§
Source§impl GepCapsule
impl GepCapsule
Sourcepub fn new(
id: String,
trigger: Vec<String>,
gene: String,
summary: String,
diff: String,
confidence: f32,
) -> Result<Self, AssetIdError>
pub fn new( id: String, trigger: Vec<String>, gene: String, summary: String, diff: String, confidence: f32, ) -> Result<Self, AssetIdError>
Create a new GEP Capsule with computed asset_id
Sourcepub fn with_content(self, content: CapsuleContent) -> Self
pub fn with_content(self, content: CapsuleContent) -> Self
Set the content
Sourcepub fn with_strategy(self, strategy: Vec<String>) -> Self
pub fn with_strategy(self, strategy: Vec<String>) -> Self
Set the strategy
Sourcepub fn with_blast_radius(self, files: usize, lines: usize) -> Self
pub fn with_blast_radius(self, files: usize, lines: usize) -> Self
Set the blast radius
Sourcepub fn with_trigger_context(self, ctx: TriggerContext) -> Self
pub fn with_trigger_context(self, ctx: TriggerContext) -> Self
Set the trigger context
Trait Implementations§
Source§impl Clone for GepCapsule
impl Clone for GepCapsule
Source§fn clone(&self) -> GepCapsule
fn clone(&self) -> GepCapsule
Returns a duplicate of the value. Read more
1.0.0 · 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 GepCapsule
impl Debug for GepCapsule
Source§impl<'de> Deserialize<'de> for GepCapsule
impl<'de> Deserialize<'de> for GepCapsule
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 From<&Capsule> for GepCapsule
Convert from Oris core Capsule to GEP Capsule
impl From<&Capsule> for GepCapsule
Convert from Oris core Capsule to GEP Capsule
Auto Trait Implementations§
impl Freeze for GepCapsule
impl RefUnwindSafe for GepCapsule
impl Send for GepCapsule
impl Sync for GepCapsule
impl Unpin for GepCapsule
impl UnsafeUnpin for GepCapsule
impl UnwindSafe for GepCapsule
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