pub struct BenchClient { /* private fields */ }Expand description
Bench operations rooted at a project + script. Obtained via
client.project(id).bench().
Implementations§
Source§impl BenchClient
impl BenchClient
Sourcepub async fn list_project_summaries(&self) -> Result<Vec<ProjectBenchSummary>>
pub async fn list_project_summaries(&self) -> Result<Vec<ProjectBenchSummary>>
GET /projects/{id}/benches — one ProjectBenchSummary per
configured bench in the project. Each row joins the bench with its
script name, judge name (when set), total case count, and the
most-recent run’s identity + mean headline score. Backs the
project-level evals landing page; mirrors the TS SDK’s
listProjectSummaries. 404 → empty list.
Sourcepub async fn get(&self, script_name: &str) -> Result<Option<Bench>>
pub async fn get(&self, script_name: &str) -> Result<Option<Bench>>
GET /projects/{id}/scripts/{name}/bench — 404 → Ok(None).
Sourcepub async fn create_or_update(
&self,
script_name: &str,
req: &CreateOrUpdateBenchRequest,
) -> Result<Bench>
pub async fn create_or_update( &self, script_name: &str, req: &CreateOrUpdateBenchRequest, ) -> Result<Bench>
POST /projects/{id}/scripts/{name}/bench — create or update.
Sourcepub async fn delete(&self, script_name: &str) -> Result<bool>
pub async fn delete(&self, script_name: &str) -> Result<bool>
DELETE /projects/{id}/scripts/{name}/bench. Returns true if a row
was deleted, false if absent.
Sourcepub async fn get_signature(&self, script_name: &str) -> Result<Value>
pub async fn get_signature(&self, script_name: &str) -> Result<Value>
GET /projects/{id}/scripts/{name}/signature — the parsed script
signature (inputs + outputs) plus named type defs. Returned as
serde_json::Value because the server emits an ad-hoc tagged shape
that doesn’t have a stable Rust mirror; the studio + MCP both treat it
as a blob.
Sourcepub async fn contract_preview(
&self,
script_name: &str,
judge_script_id: i64,
channel: Option<&str>,
) -> Result<Value>
pub async fn contract_preview( &self, script_name: &str, judge_script_id: i64, channel: Option<&str>, ) -> Result<Value>
GET /projects/{id}/scripts/{name}/bench/contract-preview — workflow +
judge signatures with structured breaks list. Returned as a Value
because the wire shape contains the (unstable, JSON-only) signature
representation.
Sourcepub async fn list_cases(&self, script_name: &str) -> Result<Vec<BenchCase>>
pub async fn list_cases(&self, script_name: &str) -> Result<Vec<BenchCase>>
GET /projects/{id}/scripts/{name}/bench/cases. 404 → empty list.
Sourcepub async fn create_case(
&self,
script_name: &str,
req: &CreateBenchCaseRequest,
) -> Result<BenchCase>
pub async fn create_case( &self, script_name: &str, req: &CreateBenchCaseRequest, ) -> Result<BenchCase>
POST /projects/{id}/scripts/{name}/bench/cases — form-builder create.
Sourcepub async fn case_contract_drift(
&self,
script_name: &str,
) -> Result<DriftReport>
pub async fn case_contract_drift( &self, script_name: &str, ) -> Result<DriftReport>
GET /projects/{id}/scripts/{name}/bench/cases/contract-drift.
Sourcepub async fn list_runs(
&self,
script_name: &str,
limit: Option<i64>,
offset: Option<i64>,
) -> Result<Vec<BenchRun>>
pub async fn list_runs( &self, script_name: &str, limit: Option<i64>, offset: Option<i64>, ) -> Result<Vec<BenchRun>>
GET /projects/{id}/scripts/{name}/bench/runs — paginated via
limit/offset.
Sourcepub async fn trigger_run(
&self,
script_name: &str,
req: &TriggerBenchRunRequest,
) -> Result<BenchRun>
pub async fn trigger_run( &self, script_name: &str, req: &TriggerBenchRunRequest, ) -> Result<BenchRun>
POST /projects/{id}/scripts/{name}/bench/runs — trigger a run.
case_ids constrains the fan-out to a subset (partial run).
Trait Implementations§
Source§impl Clone for BenchClient
impl Clone for BenchClient
Source§fn clone(&self) -> BenchClient
fn clone(&self) -> BenchClient
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more