Documentation
¶
Overview ¶
Package target provides deterministic eval.Target fixtures for offline pack tests. A Scripted target answers each scenario from a canned script and emits typed eval evidence, always stamping the scenario's revision on the subject (eval.Sample.Validate requires the match).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Script ¶
type Script struct {
Reply string
Duration time.Duration // emitted as timing evidence when > 0
ToolCalls []ToolCall
Structured *Structured
StructuredErr *StructuredErr
Err error // returned verbatim from Observe (target-stage failure)
}
Script is the canned behavior for one scenario ID.
type Scripted ¶
type Scripted struct {
// contains filtered or unexported fields
}
Scripted is a deterministic eval.Target. The zero value is unusable; use NewScripted.
func NewScripted ¶
NewScripted builds a Scripted target named name with one script per scenario ID.
type Structured ¶
Structured marks the script as having produced schema-conformant structured output.
type StructuredErr ¶
type StructuredErr struct {
Schema eval.Revision
Reason eval.StructuredErrorReason
}
StructuredErr marks the script as having produced a classified structured output failure.
type ToolCall ¶
ToolCall is one scripted tool invocation surfaced as tool_operation evidence plus a tool operation span.
type UnscriptedScenarioError ¶
type UnscriptedScenarioError struct{}
UnscriptedScenarioError reports an Observe call for a scenario the fixture has no script for. Per convention the scenario ID is withheld.
func (*UnscriptedScenarioError) Error ¶
func (e *UnscriptedScenarioError) Error() string