registry

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: MIT Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package registry verifies and installs signed Prism agent/skill registries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Install

func Install(sourceRoot, destRoot string, manifest Manifest, publicKey ed25519.PublicKey, prismVersion string) error

Install performs the full verification flow and then copies registry files from sourceRoot into destRoot.

func SignedPayload

func SignedPayload(manifest Manifest) ([]byte, error)

SignedPayload returns the canonical bytes covered by the Ed25519 signature.

func VerifyCompat

func VerifyCompat(prismVersion string, compat Compat) error

VerifyCompat checks whether prismVersion satisfies the manifest compatibility bounds. Versions are compared segment-by-segment after trimming an optional leading "v".

func VerifyFiles

func VerifyFiles(sourceRoot string, manifest Manifest) error

VerifyFiles checks every manifest file exists under sourceRoot and matches its SHA-256 digest.

func VerifyManifest

func VerifyManifest(sourceRoot string, manifest Manifest, publicKey ed25519.PublicKey, prismVersion string) error

VerifyManifest performs the full verification flow for a registry manifest: signature, Prism version compatibility, and file digests.

func VerifySignature

func VerifySignature(manifest Manifest, publicKey ed25519.PublicKey) error

VerifySignature verifies manifest.Signature against the canonical payload.

Types

type Bundle

type Bundle struct {
	ID                string       `json:"id" yaml:"id"`
	Version           string       `json:"version" yaml:"version"`
	Channel           string       `json:"channel,omitempty" yaml:"channel,omitempty"`
	Owner             string       `json:"owner,omitempty" yaml:"owner,omitempty"`
	Description       string       `json:"description,omitempty" yaml:"description,omitempty"`
	RiskLevel         string       `json:"risk_level,omitempty" yaml:"risk_level,omitempty"`
	Agents            []string     `json:"agents,omitempty" yaml:"agents,omitempty"`
	Skills            []string     `json:"skills,omitempty" yaml:"skills,omitempty"`
	RequiredPlugins   []string     `json:"required_plugins,omitempty" yaml:"required_plugins,omitempty"`
	EvaluationSuite   []string     `json:"evaluation_suite,omitempty" yaml:"evaluation_suite,omitempty"`
	DeprecationStatus string       `json:"deprecation_status,omitempty" yaml:"deprecation_status,omitempty"`
	Files             []BundleFile `json:"files" yaml:"files"`
}

Bundle is one installable group of agent and skill files.

type BundleFile

type BundleFile struct {
	Kind   string `json:"kind" yaml:"kind"` // agent | skill | other
	Path   string `json:"path" yaml:"path"`
	SHA256 string `json:"sha256" yaml:"sha256"`
}

BundleFile is one file in a managed registry bundle.

type Compat

type Compat struct {
	MinPrismVersion string `json:"min_prism_version,omitempty" yaml:"min_prism_version,omitempty"`
	MaxPrismVersion string `json:"max_prism_version,omitempty" yaml:"max_prism_version,omitempty"`
}

Compat describes which Prism versions can consume this registry.

type Manifest

type Manifest struct {
	RegistryID  string    `json:"registry_id" yaml:"registry_id"`
	Version     string    `json:"version" yaml:"version"`
	GeneratedAt time.Time `json:"generated_at" yaml:"generated_at"`
	Compat      Compat    `json:"compat" yaml:"compat"`
	Bundles     []Bundle  `json:"bundles" yaml:"bundles"`
	Signature   string    `json:"signature" yaml:"signature"`
}

Manifest is the signed registry document distributed to Prism teams.

func LoadManifest

func LoadManifest(path string) (Manifest, error)

LoadManifest reads a JSON manifest from path.

Jump to

Keyboard shortcuts

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