Documentation
¶
Overview ¶
Package skilltest provides constructors for building skill.Skill values in tests. It lives in its own package (rather than a _test.go file) so that tests in other packages can use it, and because nothing in the production build graph imports it, it is never linked into the shipped binary.
Always prefer these constructors over a bare skill.Skill{} literal when the skill declares triggers: skill.MatchSkills keys off ParsedTriggers, so a literal that sets Triggers but leaves ParsedTriggers nil is treated as "no triggers" and silently matches every message.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New constructs a Skill with parsed triggers for use in tests. Panics if any trigger string is invalid.
func NewVersioned ¶ added in v0.40.13
NewVersioned is New with an explicit Version, for tests that assert on the version field. Panics if any trigger string is invalid.
func NewWithRoundCap ¶ added in v0.42.2
func NewWithRoundCap(name, description string, triggers []string, body string, maxRounds int) skill.Skill
NewWithRoundCap is New with an explicit MaxToolRounds, for tests that exercise the per-skill tool-round cap. Unlike Triggers, MaxToolRounds has no parsed companion field, so assigning it directly on a value from New is equally safe — this constructor just keeps such tests to one line. Panics if any trigger string is invalid.
Types ¶
This section is empty.