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::{
35    BooleanEval, CalledEval, Comparator, Eval, EvalDetail, EvalOutcome, JudgeValue, NotCalledEval,
36    NumericEval,
37};
38pub use exit::ExitCode;
39pub use mock::{
40    DenyMessage, DenySpec, FieldPredicate, FieldPredicateSpec, MockCall, MockDecl, MockMatch,
41    MockPlan, MockSet, StubOutput, StubSpec,
42};
43pub use provider::{
44    supports_resume, ApiJudgeProvider, AssistantTurn, CommandProvider, JudgeKind, JudgeQuery,
45    JudgeVerdict, OneharnessProvider, Provider, SkillRef, SplitProvider, Usage, UserTurn,
46};
47pub use report::{CaseRun, Report, Summary, ValidationFinding, ValidationReport};
48pub use runner::{Runner, StreamEvent};
49pub use skill::{load_skill, validate_path, validate_skill, Finding, SkillDefinition};
50pub use testcase::{discover_cases, SimulatedUser, TestCase};