Documentation
¶
Overview ¶
Package agentplugins validates and indexes local Agent Plugin ZIP bundles.
Index ¶
- Constants
- Variables
- func IsMarketplace(name string) bool
- func IsReservedMarketplace(name string) bool
- func Marketplace(ctx context.Context, st store.Store, repoKey, name string, ...) ([]byte, error)
- func ParsePath(p string) (name, version string, ok bool)
- func Path(name, version string) string
- func Serves(t repo.PackageType) bool
- func ValidName(v string) bool
- func ValidVersion(v string) bool
- type Handler
- func (Handler) Admit(_ context.Context, env format.Env, c repo.Config, w format.Write) (format.Write, error)
- func (Handler) Deleted(context.Context, format.Env, repo.Config, []types.Item) error
- func (Handler) Deleting(context.Context, format.Env, repo.Config, types.Item) error
- func (Handler) Deployed(ctx context.Context, env format.Env, c repo.Config, it types.Item) error
- func (Handler) Inspect(ctx context.Context, env format.Env, _ repo.Config, w format.Write) (any, error)
- func (Handler) Reindex(ctx context.Context, env format.Env, c repo.Config) error
- type Metadata
Constants ¶
View Source
const ( MaxArchiveBytes = 64 << 20 MaxManifestBytes = 1 << 20 MaxFiles = 512 )
Variables ¶
View Source
var (
ErrArchive = errors.New("agentplugins: invalid agent plugin bundle")
)
View Source
var ErrMarketplace = errors.New("agentplugins: unknown agent plugin marketplace")
Functions ¶
func IsMarketplace ¶
func IsReservedMarketplace ¶
func Marketplace ¶
func Marketplace( ctx context.Context, st store.Store, repoKey, name string, can func(string) bool, ) ([]byte, error)
Marketplace selects each package's latest readable version. Rendering for each caller avoids exposing ZIPs hidden by path-scoped Read permissions.
func Serves ¶
func Serves(t repo.PackageType) bool
func ValidVersion ¶
Types ¶
type Handler ¶
type Metadata ¶
type Metadata struct {
Name string `json:"name"`
Version string `json:"version"`
Path string `json:"path"`
SHA256 string `json:"sha256"`
SHA1 string `json:"sha1,omitempty"`
Harnesses []string `json:"harnesses"`
Manifests map[string]json.RawMessage `json:"manifests"`
Root bool `json:"root"`
}
Metadata records only bounded manifest data. Path identity replaces any conflicting manifest name or version before it enters the package index.
Click to show internal directories.
Click to hide internal directories.