Skip to main content

skilltest_core/
lib.rs

1//! `skilltest-core` — the library that powers the `skilltest` CLI and, through
2//! it, the language SDKs and test-framework packages.
3//!
4//! The flow is: load a [`Config`] and one or more [`TestCase`]s, build a
5//! [`Provider`] (the boundary to `oneharness` / a model), and hand both to a
6//! [`Runner`], which drives each case into a conversation, scores the transcript
7//! with natural-language [`Eval`]s, and returns a [`Report`]. The report's JSON
8//! form is the stable contract the language SDKs consume.
9//!
10//! Everything that crosses a trust boundary — config files, test-case YAML,
11//! skill frontmatter, and every provider response — is parsed into a typed model
12//! before use.
13
14#![forbid(unsafe_code)]
15
16pub mod config;
17pub mod conversation;
18pub mod error;
19pub mod eval;
20pub mod exit;
21pub mod mock;
22pub mod provider;
23pub mod report;
24pub mod runner;
25pub mod skill;
26pub mod testcase;
27
28pub use config::{
29    ApiJudgeConfig, ApiVendor, CommandConfig, Config, JudgeConfig, OneharnessConfig, Overrides,
30    ProviderConfig,
31};
32pub use conversation::{Message, Role, ToolEvent, Transcript};
33pub use error::{Error, Result};
34pub use eval::{Comparator, Eval, EvalDetail, EvalOutcome, JudgeValue};
35pub use exit::ExitCode;
36pub use mock::{
37    DenySpec, FieldPredicate, MockCall, MockDecl, MockMatch, MockPlan, MockSet, StubSpec,
38};
39pub use provider::{
40    supports_resume, ApiJudgeProvider, AssistantTurn, CommandProvider, JudgeKind, JudgeQuery,
41    JudgeVerdict, OneharnessProvider, Provider, SkillRef, SplitProvider, Usage, UserTurn,
42};
43pub use report::{CaseRun, Report, Summary, ValidationFinding, ValidationReport};
44pub use runner::{Runner, StreamEvent};
45pub use skill::{load_skill, validate_path, validate_skill, Finding, SkillDefinition};
46pub use testcase::{discover_cases, SimulatedUser, TestCase};