Documentation
¶
Index ¶
- type FileEntry
- type InstallRequest
- type InstallResponse
- type MarketplaceService
- func (m *MarketplaceService) Install(ctx context.Context, tenantID string, req *InstallRequest) (*InstallResponse, error)
- func (m *MarketplaceService) IsConfigured() bool
- func (m *MarketplaceService) Preview(ctx context.Context, owner, repo, filePath string) (*PreviewResponse, error)
- func (m *MarketplaceService) Search(ctx context.Context, query string, page int) (*SearchResponse, error)
- type PreviewResponse
- type SearchResponse
- type SearchResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileEntry ¶
type FileEntry struct {
Name string `json:"name"`
Path string `json:"path"`
Size int `json:"size"`
Type string `json:"type"` // "file" or "dir"
}
FileEntry represents a file within a skill directory on GitHub.
type InstallRequest ¶
type InstallRequest struct {
RepoOwner string `json:"repo_owner"`
RepoName string `json:"repo_name"`
FilePath string `json:"file_path"`
SkillName string `json:"skill_name"` // optional override for name collision
}
InstallRequest specifies which GitHub skill to install. Field names match VectorChat's MarketplaceInstallRequest.
type InstallResponse ¶
type InstallResponse struct {
Name string `json:"name"`
Version string `json:"version"`
Description string `json:"description"`
}
InstallResponse contains the result of a successful installation.
type MarketplaceService ¶
type MarketplaceService struct {
// contains filtered or unexported fields
}
MarketplaceService provides GitHub-based skill discovery and installation.
func NewMarketplaceService ¶
func NewMarketplaceService(githubToken string, reg *registry.Registry, s *store.Store) *MarketplaceService
NewMarketplaceService creates a new MarketplaceService.
func (*MarketplaceService) Install ¶
func (m *MarketplaceService) Install(ctx context.Context, tenantID string, req *InstallRequest) (*InstallResponse, error)
Install fetches a skill from GitHub and uploads it to the tenant's registry.
func (*MarketplaceService) IsConfigured ¶
func (m *MarketplaceService) IsConfigured() bool
IsConfigured returns true if the GitHub token is set.
func (*MarketplaceService) Preview ¶
func (m *MarketplaceService) Preview(ctx context.Context, owner, repo, filePath string) (*PreviewResponse, error)
Preview fetches a SKILL.md from GitHub, parses its frontmatter, and lists sibling files.
func (*MarketplaceService) Search ¶
func (m *MarketplaceService) Search(ctx context.Context, query string, page int) (*SearchResponse, error)
Search queries the GitHub Code Search API for repositories containing SKILL.md files.
type PreviewResponse ¶
type PreviewResponse struct {
Name string `json:"name"`
Description string `json:"description"`
Version string `json:"version"`
Lang string `json:"lang"`
Instructions string `json:"instructions"`
RepoOwner string `json:"repo_owner"`
RepoName string `json:"repo_name"`
FilePath string `json:"file_path"`
Files []FileEntry `json:"files"`
}
PreviewResponse contains the parsed skill metadata and sibling files. Field names match VectorChat's MarketplacePreviewResponse.
type SearchResponse ¶
type SearchResponse struct {
Results []SearchResult `json:"results"`
TotalCount int `json:"total_count"`
HasMore bool `json:"has_more"`
}
SearchResponse wraps the paginated search results. Field names match VectorChat's MarketplaceSearchResponse.
type SearchResult ¶
type SearchResult struct {
Name string `json:"name"`
Description string `json:"description"`
RepoOwner string `json:"repo_owner"`
RepoName string `json:"repo_name"`
FilePath string `json:"file_path"`
Stars int `json:"stars"`
HTMLURL string `json:"html_url"`
}
SearchResult represents a single result from GitHub Code Search. Field names match VectorChat's MarketplaceSearchResult for compatibility.