Documentation
¶
Overview ¶
Package github provides an fs.FS implementation backed by the GitHub Contents API, plus a URL parser for github.com repository URLs. It is used by rootresolver to read agent specs and skills directly from a remote repository without requiring a local clone.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseURL ¶
ParseURL parses a github.com repository URL and returns owner, repo, and ref. If no branch is specified in the URL, ref is "HEAD".
Supported formats:
- https://github.com/owner/repo
- https://github.com/owner/repo.git
- https://github.com/owner/repo/tree/branch-or-tag
- git@github.com:owner/repo.git
Types ¶
type FS ¶
type FS struct {
// contains filtered or unexported fields
}
FS implements fs.FS using the GitHub Contents API. Each FS instance maintains an in-process response cache so that repeated reads of the same path (e.g. listing agents/, then opening each file) are served without additional API calls.
Concurrency: safe for concurrent use.