skilltest

package
v0.42.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

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

func New(name, description string, triggers []string, body string) skill.Skill

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

func NewVersioned(name, description, version string, triggers []string, body string) skill.Skill

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL