Documentation
¶
Index ¶
- func DetectPluginName(rootDir string) string
- func RegisterRoutes(api huma.API, router chi.Router, importStore *Store, skillStore *skill.Store, ...)
- type DiscoveredSkill
- type FetchResult
- type Fetcher
- type ImportSource
- type RouteOptions
- type Source
- type Store
- func (s *Store) GetBySkillID(ctx context.Context, skillID string) (*ImportSource, error)
- func (s *Store) GetBySkillName(ctx context.Context, skillName string) (*ImportSource, error)
- func (s *Store) ListAll(ctx context.Context) ([]ImportSource, error)
- func (s *Store) Upsert(ctx context.Context, src ImportSource) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetectPluginName ¶
DetectPluginName looks for .claude-plugin/plugin.json in the root directory and returns the plugin name if found.
Types ¶
type DiscoveredSkill ¶
type DiscoveredSkill struct {
Name string `json:"name"`
Description string `json:"description"`
Path string `json:"path"`
Files []skill.FileEntry `json:"files"`
ScanStatus string `json:"scan_status"`
ScanFindingsCount int `json:"scan_findings_count"`
ExistingVersion int `json:"existing_version"`
}
func Discover ¶
func Discover(rootDir, subPath string) ([]DiscoveredSkill, error)
func DiscoverAll ¶ added in v0.18.0
func DiscoverAll(rootDir, subPath string) ([]DiscoveredSkill, error)
DiscoverAll returns every skill directory under subPath, sorted by name and then path, including two directories that declare one name. A git connection reports such a pair rather than keeping one without a word.
type FetchResult ¶
type ImportSource ¶
type ImportSource struct {
ID string `json:"id"`
SkillID string `json:"skill_id"`
SkillName string `json:"skill_name,omitempty"`
SourceType string `json:"source_type"`
SourceURL string `json:"source_url"`
SourcePath string `json:"source_path"`
SourceRef string `json:"source_ref"`
CommitSHA string `json:"commit_sha"`
ImportedAt time.Time `json:"imported_at"`
LastChecked *time.Time `json:"last_checked"`
}
type RouteOptions ¶ added in v0.10.0
type RouteOptions struct {
// External is the opt-in external scanner (Phase 2); nil disables it.
External *scan.ExternalScanner
// Queue, when set together with Suites, lets an import enqueue an
// evaluation for a skill that has a registered suite. A queue outage
// must never fail an import — mirrors the publish path.
Queue evalqueue.Executor
// Suites looks up the latest registered eval suite for a skill by name.
Suites *evalsuite.Registry
// QualityFloor is the minimum headline quality score a verified
// evaluation must reach to clear a held version. Mirrors
// skill.RouteOptions.QualityFloor; the zero value means any verified,
// complete, contract-clean report clears.
QualityFloor float64
// Ownership resolves and claims skill ownership, mirroring
// skill.RouteOptions.Ownership. A nil resolver leaves the zero
// gate.OwnerState, which contributes nothing — that is what keeps every
// test harness on the pre-ownership behaviour.
Ownership skill.OwnerResolver
// Git refuses an import onto a git-bound skill. Nil means every skill is
// native.
Git skill.GitBoundary
}
RouteOptions carries the optional collaborators RegisterRoutes wires into the import handlers. Each is independently optional (nil disables the behavior it powers).
type Source ¶
type Source struct {
Type string `json:"type"`
Owner string `json:"owner"`
Repo string `json:"repo"`
Ref string `json:"ref"`
Path string `json:"path"`
CommitSHA string `json:"commit_sha"`
}
func ResolveURL ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) GetBySkillID ¶
func (*Store) GetBySkillName ¶
Click to show internal directories.
Click to hide internal directories.