pub struct RunConfig {
pub schema: SchemaConfig,
pub predicate: Option<ToolPredicate>,
pub tool_filter: Option<ToolNamePredicate>,
pub assertions: AssertionSet,
pub state_machine: StateMachineConfig,
pub pre_run_hook: Option<PreRunHook>,
}Expand description
Top-level configuration for executing a tooltest run.
Fields§
§schema: SchemaConfigMCP schema configuration.
predicate: Option<ToolPredicate>Optional predicate to filter eligible tools.
tool_filter: Option<ToolNamePredicate>Optional predicate to filter eligible tools by name.
assertions: AssertionSetAssertion rules to evaluate during the run.
state_machine: StateMachineConfigState-machine generator configuration.
pre_run_hook: Option<PreRunHook>Optional pre-run hook to execute before validation and each case.
Implementations§
Source§impl RunConfig
impl RunConfig
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a run configuration with defaults for schema and assertions.
The state-machine generator is always used, and it is strict by default (required values must come from the corpus unless lenient sourcing is enabled).
Sourcepub fn with_schema(self, schema: SchemaConfig) -> Self
pub fn with_schema(self, schema: SchemaConfig) -> Self
Sets the schema configuration.
Sourcepub fn with_predicate(self, predicate: ToolPredicate) -> Self
pub fn with_predicate(self, predicate: ToolPredicate) -> Self
Sets the tool predicate used for eligibility filtering.
Sourcepub fn with_tool_filter(self, predicate: ToolNamePredicate) -> Self
pub fn with_tool_filter(self, predicate: ToolNamePredicate) -> Self
Sets the tool name predicate used for eligibility filtering.
Sourcepub fn with_assertions(self, assertions: AssertionSet) -> Self
pub fn with_assertions(self, assertions: AssertionSet) -> Self
Sets the assertion rules for the run.
Sourcepub fn with_state_machine(self, state_machine: StateMachineConfig) -> Self
pub fn with_state_machine(self, state_machine: StateMachineConfig) -> Self
Sets the state-machine generator configuration.
Sourcepub fn with_pre_run_hook(self, hook: PreRunHook) -> Self
pub fn with_pre_run_hook(self, hook: PreRunHook) -> Self
Sets the pre-run hook for this run.