agentplugins

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package agentplugins validates and indexes local Agent Plugin ZIP bundles.

Index

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 IsMarketplace(name string) bool

func IsReservedMarketplace

func IsReservedMarketplace(name string) bool

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 ParsePath

func ParsePath(p string) (name, version string, ok bool)

func Path

func Path(name, version string) string

func Serves

func Serves(t repo.PackageType) bool

func ValidName

func ValidName(v string) bool

func ValidVersion

func ValidVersion(v string) bool

Types

type Handler

type Handler struct{ generic.Handler }

func (Handler) Admit

func (Handler) Admit(
	_ context.Context,
	env format.Env,
	c repo.Config,
	w format.Write,
) (format.Write, error)

func (Handler) Deleted

func (Handler) Deleting

func (Handler) Deployed

func (Handler) Deployed(ctx context.Context, env format.Env, c repo.Config, it types.Item) error

func (Handler) Inspect

func (Handler) Inspect(
	ctx context.Context,
	env format.Env,
	_ repo.Config,
	w format.Write,
) (any, error)

func (Handler) Reindex

func (Handler) Reindex(ctx context.Context, env format.Env, c repo.Config) error

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.

func ReadArchive

func ReadArchive(r io.Reader, size int64) (Metadata, error)

ReadArchive checks every ZIP member, including CRC and total decompressed size. The pinned 7.161.32 target indexes harness manifests; root-only Agent Plugins Standard bundles arrived in a later JFrog release.

Jump to

Keyboard shortcuts

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