Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateMode ¶
ValidateMode validates the contents of a Config
Types ¶
type Config ¶
type Config struct {
Slug string
Name string
GroupsRaw []GroupEntry // Raw data from frontmatter
GroupsParsed []ParsedGroupEntry // Parsed and validated groups
RoleDefinition string // From frontmatter
CustomInstructions *string // Content of the Markdown body (if not empty)
FilePath string // Path to the source Markdown file
Source string // Original source path from frontmatter
}
Config represents the complete data for a custom mode
func ParseModeFile ¶
ParseModeFile parses a specified Markdown file and returns a Config
type GroupEntry ¶
type GroupEntry interface{}
GroupEntry represents either a simple group name (string) or a [string, GroupOptions] tuple Using interface{} for flexibility, requires custom parsing after frontmatter parsing
type GroupOptions ¶
type GroupOptions struct {
FileRegex *string `yaml:"fileRegex,omitempty" json:"fileRegex,omitempty"`
Description *string `yaml:"description,omitempty" json:"description,omitempty"`
}
GroupOptions defines options for tool groups (like file access restrictions)
type Metadata ¶
type Metadata struct {
Name string `yaml:"name" json:"name"`
Groups []GroupEntry `yaml:"groups" json:"groups"` // Requires custom parsing after initial parse
RoleDefinition string `yaml:"roleDefinition" json:"roleDefinition"`
Source string `yaml:"source,omitempty" json:"source,omitempty"`
}
Metadata represents data parsed from frontmatter
type ParsedGroupEntry ¶
type ParsedGroupEntry struct {
Name string
Options *GroupOptions
}
ParsedGroupEntry represents a validated group entry
func ParseGroupEntries ¶
func ParseGroupEntries(rawGroups []GroupEntry) ([]ParsedGroupEntry, error)
ParseGroupEntries parses and validates raw GroupEntry slices
Click to show internal directories.
Click to hide internal directories.