Documentation
¶
Index ¶
- Constants
- Variables
- func SkillsLoadTool() llmtoolsgoSpec.Tool
- func SkillsReadResourceTool() llmtoolsgoSpec.Tool
- func SkillsRunScriptTool() llmtoolsgoSpec.Tool
- func SkillsUnloadTool() llmtoolsgoSpec.Tool
- type LoadArgs
- type LoadMode
- type LoadOut
- type ReadResourceArgs
- type RunScriptArgs
- type SessionID
- type SkillActivity
- type SkillHandle
- type SkillRecord
- type UnloadArgs
- type UnloadOut
Constants ¶
View Source
const ( SkillsRulesPromptLoadOnly = skillsToolsLoadOnly + "\n" + skillsRulesCommon SkillsRulesPromptWithoutRunScript = skillsToolsBase + "\n" + skillsRulesCommon SkillsRulesPromptAll = skillsToolsAllWithRunScript + "\n" + skillsRulesCommon )
View Source
const FuncIDSkillsLoad llmtoolsgoSpec.FuncID = "github.com/flexigpt/agentskills-go/skills-load"
View Source
const FuncIDSkillsReadResource llmtoolsgoSpec.FuncID = "github.com/flexigpt/agentskills-go/skills-readresource"
View Source
const FuncIDSkillsRunScript llmtoolsgoSpec.FuncID = "github.com/flexigpt/agentskills-go/skills-runscript"
View Source
const FuncIDSkillsUnload llmtoolsgoSpec.FuncID = "github.com/flexigpt/agentskills-go/skills-unload"
Variables ¶
View Source
var ( ErrInvalidRuntimeArgument = errors.New("invalid argument") ErrSkillNotFound = errors.New("skill not found") ErrSkillAlreadyExists = errors.New("skill already exists") ErrProviderNotFound = errors.New("provider not found") ErrSkillNotActive = errors.New("skill not active") ErrSessionNotFound = errors.New("session not found") ErrSkillNotAllowed = errors.New("skill not allowed") )
Functions ¶
func SkillsLoadTool ¶
func SkillsLoadTool() llmtoolsgoSpec.Tool
func SkillsReadResourceTool ¶
func SkillsReadResourceTool() llmtoolsgoSpec.Tool
func SkillsRunScriptTool ¶
func SkillsRunScriptTool() llmtoolsgoSpec.Tool
func SkillsUnloadTool ¶
func SkillsUnloadTool() llmtoolsgoSpec.Tool
Types ¶
type LoadArgs ¶
type LoadArgs struct {
Skills []SkillHandle `json:"skills"`
Mode LoadMode `json:"mode,omitempty"` // default: replace
}
type LoadOut ¶
type LoadOut struct {
ActiveSkills []SkillHandle `json:"activeSkills"`
}
type ReadResourceArgs ¶
type ReadResourceArgs struct {
SkillName string `json:"skillName"`
SkillLocation string `json:"skillLocation"`
// ResourceLocation is provider-defined; for fs providers this is typically a relative file path.
ResourceLocation string `json:"resourceLocation"`
Encoding provider.ReadResourceEncoding `json:"encoding,omitempty"` // default: text
}
type RunScriptArgs ¶
type RunScriptArgs struct {
SkillName string `json:"skillName"`
SkillLocation string `json:"skillLocation"`
// ScriptLocation is provider-defined; for fs providers this is typically a relative script file path.
ScriptLocation string `json:"scriptLocation"`
Args []string `json:"args,omitempty"`
Env map[string]string `json:"env,omitempty"`
// WorkDir is provider-defined; for fs providers this is typically a relative directory under the skill base.
WorkDir string `json:"workDir,omitempty"`
}
type SkillActivity ¶
type SkillActivity string
SkillActivity controls whether SkillsPrompt includes active, inactive, or both sets.
const ( // SkillActivityAny returns both: // - <activeSkills> (if SessionID is set) // - <availableSkills> (inactive skills if SessionID is set; otherwise all skills) SkillActivityAny SkillActivity = "any" // SkillActivityActive returns only <activeSkills>. Requires SessionID. SkillActivityActive SkillActivity = "active" // SkillActivityInactive returns only <availableSkills> for inactive skills. If SessionID // is empty, all skills are treated as inactive. SkillActivityInactive SkillActivity = "inactive" )
type SkillHandle ¶
type SkillHandle struct {
// Name is the catalog-computed LLM-visible name (usually the real name;
// may be disambiguated with an opaque suffix like "my-skill#1a2b3c4d").
Name string `json:"name"`
// Location is the user-provided and provider-interpreted base location for the skill.
Location string `json:"location"`
}
SkillHandle is the LLM-facing selector for a skill.
IMPORTANT CONTRACT:
- This is ONLY for LLM prompt/tooling APIs (load/read/run/unload).
- It MUST NOT be used for host/lifecycle operations (add/remove/list).
- It MUST NOT leak internal canonicalization.
Name is computed by the catalog (may include an opaque suffix to disambiguate). Location is the user-provided base location string as registered (not canonicalized).
type SkillRecord ¶
type SkillRecord struct {
Def provider.SkillDef `json:"def"`
Name string `json:"name"`
Description string `json:"description"`
DisplayName string `json:"displayName,omitempty"`
// Insert is the FlexiGPT insertion hint parsed from SKILL.md.
// Defaults to "instructions".
Insert document.SkillInsert `json:"insert"`
Arguments []document.SkillArgument `json:"arguments,omitempty"`
Tags []string `json:"tags,omitempty"`
Resources provider.SkillResourceInfo `json:"resources"`
// RawFrontmatter preserves the parsed SKILL.md YAML frontmatter for callers that want
// compatibility metadata that this runtime does not interpret.
RawFrontmatter map[string]any `json:"rawFrontmatter,omitempty"`
Warnings []string `json:"warnings,omitempty"`
Digest string `json:"digest,omitempty"`
}
SkillRecord is the catalog record for a skill.
type UnloadArgs ¶
type UnloadArgs struct {
Skills []SkillHandle `json:"skills,omitempty"`
All bool `json:"all,omitempty"`
}
type UnloadOut ¶
type UnloadOut struct {
ActiveSkills []SkillHandle `json:"activeSkills"`
}
Click to show internal directories.
Click to hide internal directories.