Documentation
¶
Index ¶
- Constants
- func DigestOSDir(dir string) (string, error)
- func DigestSkillDir(fsys fs.FS, root string) (string, error)
- func PrintSummary(stdout io.Writer, summary Summary)
- func ValidateSkillDir(fsys fs.FS, name string) error
- type LockEntry
- type LockFile
- type Options
- type SkillResult
- type SourcesFile
- type Summary
- type TrustedSource
Constants ¶
View Source
const ( ScopeAuto = "auto" ScopeProject = "project" ScopeUser = "user" ActionInstalled = "installed" ActionSkipped = "skipped" ActionFailed = "failed" MaxSkillFileBytes int64 = 1 << 20 )
Variables ¶
This section is empty.
Functions ¶
func DigestOSDir ¶
func PrintSummary ¶ added in v0.0.91
PrintSummary reports installed, unchanged, modified, and failed skills.
Types ¶
type LockEntry ¶
type LockEntry struct {
Name string `yaml:"name"`
Source string `yaml:"source"`
Ref string `yaml:"ref"`
Commit string `yaml:"commit,omitempty"`
SkillPath string `yaml:"skill_path"`
Scope string `yaml:"scope"`
// Path is relative to the project root, or CODEX_HOME for user scope.
Path string `yaml:"path"`
Digest string `yaml:"digest"`
}
type SkillResult ¶
type SourcesFile ¶
type SourcesFile struct {
Version int `yaml:"version"`
Sources map[string]TrustedSource `yaml:"sources"`
}
func LoadSources ¶
func LoadSources(fsys fs.FS) (SourcesFile, error)
func (SourcesFile) TrustedGitHubSkill ¶
func (SourcesFile) TrustedSelector ¶
func (s SourcesFile) TrustedSelector(selector string) (string, bool, error)
func (SourcesFile) Validate ¶
func (s SourcesFile) Validate() error
type Summary ¶
type Summary struct {
Results []SkillResult
}
func (Summary) Failed ¶
func (s Summary) Failed() []SkillResult
func (Summary) HasFailures ¶
func (Summary) Installed ¶
func (s Summary) Installed() []SkillResult
func (Summary) Skipped ¶
func (s Summary) Skipped() []SkillResult
type TrustedSource ¶
type TrustedSource struct {
Type string `yaml:"type"`
Owner string `yaml:"owner"`
Repo string `yaml:"repo"`
AllowedRefs []string `yaml:"allowed_refs"`
AllowedPaths []string `yaml:"allowed_paths"`
SelectorPrefixes []string `yaml:"selector_prefixes"`
InstallByDefault bool `yaml:"install_by_default"`
AllowScripts bool `yaml:"allow_scripts"`
}
Click to show internal directories.
Click to hide internal directories.