Documentation
¶
Index ¶
- Variables
- func ExpandArgs(body, rawArgs string) string
- func ExpandShellInjections(body string) string
- func ExpandVars(body, skillDir, sessionID string) string
- func FirstLine(s string, maxLen int) string
- func NormalizeAgentType(agent string) string
- func NormalizeName(name string) string
- func RenderListing(skills []Spec, opts ListingOptions) string
- func SourceAllowsPrivilegedFields(source string) bool
- func SourceAllowsShellExecution(source string) bool
- func StripFrontmatter(content string) string
- func ValidName(name string) bool
- func WrapPrompt(spec Spec, body string) string
- type Catalog
- type Delta
- type DirSource
- type GetPromptFn
- type InvocationMode
- type InvocationResult
- type InvocationSource
- type InvokeInput
- type ListingOptions
- type Spec
- type UsageTracker
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ExpandArgs ¶
func ExpandShellInjections ¶
func ExpandVars ¶
func NormalizeAgentType ¶
func NormalizeName ¶
func RenderListing ¶
func RenderListing(skills []Spec, opts ListingOptions) string
func StripFrontmatter ¶
func WrapPrompt ¶
Types ¶
type Catalog ¶
type Catalog struct {
// contains filtered or unexported fields
}
func NewStaticCatalog ¶
type GetPromptFn ¶
type InvocationMode ¶
type InvocationMode string
const ( ModeInline InvocationMode = "inline" ModeFork InvocationMode = "fork" )
type InvocationResult ¶
type InvocationResult struct {
Spec Spec
Mode InvocationMode
PromptText string
Agent string
Delta Delta
}
func ProcessInvocation ¶
func ProcessInvocation(ctx context.Context, catalog *Catalog, in InvokeInput) (*InvocationResult, error)
type InvocationSource ¶
type InvocationSource string
const ( SourceModel InvocationSource = "model" SourceUser InvocationSource = "user" )
type InvokeInput ¶
type InvokeInput struct {
Name string
Args string
SessionID string
Source InvocationSource
}
type ListingOptions ¶
type ListingOptions struct {
CharBudget int
MaxLineChars int
MaxWhenChars int
IncludeWhenToUse bool
}
func DefaultListingOptions ¶
func DefaultListingOptions() ListingOptions
type Spec ¶
type Spec struct {
Name string
Description string
WhenToUse string
Version string
FilePath string
BaseDir string
Source string
DisableModelInvocation bool
DisableUserInvocation bool
ArgumentHint string
ArgumentNames []string
Context string
Agent string
Model string
Effort string
AllowedTools []string
Paths []string
HasExplicitDescription bool
FrontmatterKeys []string
GetPrompt GetPromptFn
}
func BundledSpecs ¶
func LoadFromDir ¶
func OrderForPrompt ¶
func ValidateDir ¶
type UsageTracker ¶
type UsageTracker struct {
// contains filtered or unexported fields
}
func NewUsageTracker ¶
func NewUsageTracker(path string) (*UsageTracker, error)
Click to show internal directories.
Click to hide internal directories.