Documentation
¶
Index ¶
- Constants
- Variables
- func BuildActivationContext(value ActivationContext) map[string]interface{}
- func NormalizeContextMode(value string) string
- func Parse(path, root, source, content string) (*Skill, []Diagnostic, error)
- func RenderPrompt(skills []Metadata, budgetChars int) string
- type ActivationContext
- type AgentlyMetadata
- type AllowedTool
- type Diagnostic
- type Frontmatter
- func (f Frontmatter) AgentIDValue() string
- func (f Frontmatter) AsyncNarratorPromptValue() string
- func (f Frontmatter) ContextMode() string
- func (f Frontmatter) EffortValue() string
- func (f Frontmatter) MaxTokensValue() int
- func (f Frontmatter) ModelPreferencesValue() *llm.ModelPreferences
- func (f Frontmatter) ModelValue() string
- func (f Frontmatter) PreprocessEnabled() bool
- func (f Frontmatter) PreprocessTimeoutValue() int
- func (f Frontmatter) TemperatureValue() *float64
- type LegacyAgentlyFields
- type Metadata
- type Registry
- type Skill
Constants ¶
const ( ActivationNameKey = "skillActivationName" ActivationBodyKey = "skillActivationBody" ActivationModeKey = "skillActivationMode" ActivationArgsKey = "skillActivationArgs" ActivationEmbeddedKey = "skillActivationEmbedded" )
const ( ServiceName = "llm/skills" ListToolName = ServiceName + ":list" ActivateToolName = ServiceName + ":activate" )
const DefaultPromptBudgetChars = 4000
Variables ¶
var ( ListToolNameCanonical = mcpname.Canonical(ListToolName) ActivateToolNameCanonical = mcpname.Canonical(ActivateToolName) )
Functions ¶
func BuildActivationContext ¶
func BuildActivationContext(value ActivationContext) map[string]interface{}
func NormalizeContextMode ¶
NormalizeContextMode resolves a skill's `context:` value to one of the canonical execution modes:
"inline" — body injected into the current turn (default) "fork" — child agent in its own conversation; runtime awaits result "detach" — child agent in its own conversation; fire-and-forget
Unset or unrecognized values default to "inline" — the safest cross-runtime behavior, matching how Claude / Codex parsers treat unknown execution-mode hints (the body just runs in the current context). Authors who want fork/detach must opt in explicitly via metadata.agently-context.
func RenderPrompt ¶
Types ¶
type ActivationContext ¶
func ReadActivationContext ¶
func ReadActivationContext(values map[string]interface{}) (ActivationContext, bool)
type AgentlyMetadata ¶
type AllowedTool ¶
func ParseAllowedTools ¶
func ParseAllowedTools(raw string) []AllowedTool
type Diagnostic ¶
type Frontmatter ¶
type Frontmatter struct {
Name string `yaml:"name"`
Description string `yaml:"description"`
License string `yaml:"license,omitempty"`
Metadata map[string]any `yaml:"metadata,omitempty"`
Agently *AgentlyMetadata `yaml:"-"`
AllowedTools string `yaml:"allowed-tools,omitempty"`
Raw map[string]any `yaml:"-"`
}
func (Frontmatter) AgentIDValue ¶
func (f Frontmatter) AgentIDValue() string
AgentIDValue returns the skill's canonical preferred child-agent identity for fork/detach runs. Legacy top-level fields are normalized in parser.go.
func (Frontmatter) AsyncNarratorPromptValue ¶
func (f Frontmatter) AsyncNarratorPromptValue() string
AsyncNarratorPromptValue returns the canonical async narrator override.
func (Frontmatter) ContextMode ¶
func (f Frontmatter) ContextMode() string
ContextMode returns the canonical execution-mode hint (inline / fork / detach). Legacy top-level fields are normalized in parser.go; runtime code only reads canonical Agently metadata from Frontmatter.
func (Frontmatter) EffortValue ¶
func (f Frontmatter) EffortValue() string
EffortValue returns the canonical reasoning-effort hint.
func (Frontmatter) MaxTokensValue ¶
func (f Frontmatter) MaxTokensValue() int
MaxTokensValue returns the canonical per-skill max-output-tokens cap.
func (Frontmatter) ModelPreferencesValue ¶
func (f Frontmatter) ModelPreferencesValue() *llm.ModelPreferences
ModelPreferencesValue returns the canonical MCP-aligned model preferences.
func (Frontmatter) ModelValue ¶
func (f Frontmatter) ModelValue() string
ModelValue returns the canonical exact-name model override for this skill.
func (Frontmatter) PreprocessEnabled ¶
func (f Frontmatter) PreprocessEnabled() bool
PreprocessEnabled reports the canonical preprocess flag.
func (Frontmatter) PreprocessTimeoutValue ¶
func (f Frontmatter) PreprocessTimeoutValue() int
PreprocessTimeoutValue returns the canonical preprocess timeout.
func (Frontmatter) TemperatureValue ¶
func (f Frontmatter) TemperatureValue() *float64
TemperatureValue returns the canonical per-skill sampling temperature.
type LegacyAgentlyFields ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry() *Registry
func (*Registry) Add ¶
func (r *Registry) Add(s *Skill, diags []Diagnostic)
func (*Registry) Diagnostics ¶
func (r *Registry) Diagnostics() []Diagnostic