registry

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchKitBody

func FetchKitBody(ctx context.Context, client FileFetcher, registryRepo string, entry manifest.KitEntry) (*kit.Kit, error)

func FindKit

func FindKit(ctx context.Context, client FileFetcher, registryRepo, name string) (manifest.KitEntry, error)

Types

type CommitResult

type CommitResult struct {
	SHA string
	URL string
}

CommitResult describes the commit created by a push.

type FileFetcher

type FileFetcher interface {
	FetchFile(ctx context.Context, owner, repo, path, ref string) ([]byte, error)
}

type GitHubPusher

type GitHubPusher interface {
	GetTree(ctx context.Context, owner, repo, ref string) ([]TreeEntry, error)
	LatestCommitSHA(ctx context.Context, owner, repo, branch string) (string, error)
	PushFilesAtomic(ctx context.Context, owner, repo, branch string, files map[string][]byte, message, expectedHead string) (CommitResult, error)
}

GitHubPusher is the GitHub API surface needed to push a skill.

type KitPusher

type KitPusher interface {
	GitHubPusher
	FetchFile(ctx context.Context, owner, repo, path, ref string) ([]byte, error)
}

func NewGitHubPusher

func NewGitHubPusher(client *gh.Client) KitPusher

NewGitHubPusher adapts the shared GitHub client to the push interface.

type ManifestKit

type ManifestKit struct {
	Registry    string
	Name        string
	Path        string
	Description string
	Author      string
}

func ListKits

func ListKits(ctx context.Context, client FileFetcher, registryRepo string) ([]ManifestKit, error)

type PushResult

type PushResult struct {
	Skill     string
	Registry  string
	CommitSHA string
	CommitURL string
}

PushResult is returned after a successful skill push.

func PushKit

func PushKit(ctx context.Context, client KitPusher, kitName, registryRepo string, body []byte, entry manifest.KitEntry, expectedContentHash string) (PushResult, error)

PushKit publishes one local kit YAML file and updates the registry manifest.

func PushSkill

func PushSkill(ctx context.Context, client GitHubPusher, skillName, skillDir string, source state.SkillSource) (PushResult, error)

PushSkill publishes all files in skillDir back to source in one commit.

type TreeEntry

type TreeEntry struct {
	Path string
	Type string
	SHA  string
}

TreeEntry is a Git tree entry used for conflict checks.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL