pub struct Assertion {Show 26 fields
pub state: Option<String>,
pub state_in: Option<Vec<String>>,
pub state_not: Option<String>,
pub state_history_contains: Option<String>,
pub response_contains: Option<StringList>,
pub response_contains_any: Option<StringList>,
pub response_not_contains: Option<StringList>,
pub response_not_empty: Option<bool>,
pub response_semantic: Option<JudgeAssertion>,
pub disambiguation: Option<DisambiguationExpectation>,
pub no_disambiguation: Option<bool>,
pub tool_called: Option<ToolCalledAssertion>,
pub tool_not_called: Option<String>,
pub skill_triggered: Option<String>,
pub metadata_contains: Option<HashMap<String, Value>>,
pub metadata_path: Option<PathAssertion>,
pub context_path: Option<PathAssertion>,
pub facts_include: Option<FactsAssertion>,
pub relationship: Option<RelationshipAssertion>,
pub persona_secret_revealed: Option<SecretAssertion>,
pub orchestration: Option<OrchestrationAssertion>,
pub observability: Option<ObservabilityAssertion>,
pub judge: Option<JudgeAssertion>,
pub any: Option<Vec<Assertion>>,
pub all: Option<Vec<Assertion>>,
pub not: Option<Box<Assertion>>,
}Expand description
Collection of assertion clauses evaluated against one turn.
Fields§
§state: Option<String>Current or expected state name.
state_in: Option<Vec<String>>Allowed current state names.
state_not: Option<String>State name that must not be current.
state_history_contains: Option<String>State name expected in transition history.
response_contains: Option<StringList>Required substring or substrings in the response.
response_contains_any: Option<StringList>Response passes when any listed substring is present.
response_not_contains: Option<StringList>Substring or substrings that must be absent from the response.
response_not_empty: Option<bool>Whether the response must contain non-whitespace text.
response_semantic: Option<JudgeAssertion>Semantic response-quality judge assertion.
disambiguation: Option<DisambiguationExpectation>Expected disambiguation status or evidence.
no_disambiguation: Option<bool>Whether no active disambiguation should have occurred.
tool_called: Option<ToolCalledAssertion>Tool call assertion in string or object form.
tool_not_called: Option<String>Tool ID that must not appear in tool evidence.
skill_triggered: Option<String>Skill ID expected in skill evidence.
metadata_contains: Option<HashMap<String, Value>>Top-level response metadata key-value expectations.
metadata_path: Option<PathAssertion>Dot-path assertion over response metadata.
context_path: Option<PathAssertion>Dot-path assertion over runtime context.
facts_include: Option<FactsAssertion>Fact assertion for actor memory evidence.
relationship: Option<RelationshipAssertion>Relationship memory assertion or evidence.
persona_secret_revealed: Option<SecretAssertion>Persona secret reveal assertion.
orchestration: Option<OrchestrationAssertion>Orchestration metadata assertion or evidence.
observability: Option<ObservabilityAssertion>Observability assertion, setting, or report value.
judge: Option<JudgeAssertion>LLM judge assertion or resolver for semantic quality.
any: Option<Vec<Assertion>>Child assertions where at least one must pass.
all: Option<Vec<Assertion>>Child assertions where every child must pass.
not: Option<Box<Assertion>>Child assertion that must fail.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Assertion
impl<'de> Deserialize<'de> for Assertion
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>,
Auto Trait Implementations§
impl Freeze for Assertion
impl RefUnwindSafe for Assertion
impl Send for Assertion
impl Sync for Assertion
impl Unpin for Assertion
impl UnsafeUnpin for Assertion
impl UnwindSafe for Assertion
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more