Documentation
¶
Overview ¶
Package registry verifies and installs signed Prism agent/skill registries.
Index ¶
- func Install(sourceRoot, destRoot string, manifest Manifest, publicKey ed25519.PublicKey, ...) error
- func SignedPayload(manifest Manifest) ([]byte, error)
- func VerifyCompat(prismVersion string, compat Compat) error
- func VerifyFiles(sourceRoot string, manifest Manifest) error
- func VerifyManifest(sourceRoot string, manifest Manifest, publicKey ed25519.PublicKey, ...) error
- func VerifySignature(manifest Manifest, publicKey ed25519.PublicKey) error
- type Bundle
- type BundleFile
- type Compat
- type Manifest
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 ¶
SignedPayload returns the canonical bytes covered by the Ed25519 signature.
func VerifyCompat ¶
VerifyCompat checks whether prismVersion satisfies the manifest compatibility bounds. Versions are compared segment-by-segment after trimming an optional leading "v".
func VerifyFiles ¶
VerifyFiles checks every manifest file exists under sourceRoot and matches its SHA-256 digest.
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 ¶
LoadManifest reads a JSON manifest from path.