releasecontract

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package releasecontract defines the public, provider-neutral identity of a SecondBox release.

Index

Constants

View Source
const (
	ArtifactManifestSchema      = "secondbox.release/artifact-manifest/v2"
	QualificationEvidenceSchema = "secondbox.release/qualification-evidence/v1"

	TypeScriptPackage = "@secondstack-ai/secondbox"
	GoModule          = "github.com/SecondStack-AI/SecondBox"
	ControlPlaneImage = "ghcr.io/secondstack-ai/secondbox/control-plane"
	RunnerImage       = "ghcr.io/secondstack-ai/secondbox/runner"
	MicroVMImage      = "ghcr.io/secondstack-ai/secondbox/microvm-artifacts"
)

Variables

This section is empty.

Functions

func ArtifactManifestLocation

func ArtifactManifestLocation(version string) string

func BinaryLocation

func BinaryLocation(version, name, platform string) string

func Digest

func Digest(data []byte) string

func ParseTag

func ParseTag(tag string) (string, error)

func QualificationEvidenceLocation added in v0.2.0

func QualificationEvidenceLocation(version string) string

func SourceFreeSuiteLocation

func SourceFreeSuiteLocation(version string) string

Types

type ArtifactManifest

type ArtifactManifest struct {
	SchemaVersion string `json:"schemaVersion"`
	Identity
	OpenAPI               OpenAPIArtifact          `json:"openapi"`
	RunnerProtocol        ProtocolWindow           `json:"runnerProtocol"`
	GuestProtocol         ProtocolWindow           `json:"guestProtocol"`
	Platforms             PlatformMatrix           `json:"platforms"`
	GoSDK                 SDKArtifact              `json:"goSdk"`
	TypeScriptSDK         SDKArtifact              `json:"typeScriptSdk"`
	ControlPlane          OCIArtifact              `json:"controlPlane"`
	Runner                OCIArtifact              `json:"runner"`
	MicroVM               MicroVMArtifact          `json:"microvm"`
	Binaries              []BinaryArtifact         `json:"binaries"`
	SBOMs                 []Reference              `json:"sboms"`
	ArtifactAttestations  []Reference              `json:"artifactAttestations,omitempty"`
	SourceFreeSuite       Reference                `json:"sourceFreeSuite,omitempty"`
	QualificationEvidence Reference                `json:"qualificationEvidence"`
	StandardBundles       []StandardBundleArtifact `json:"standardBundles"`
}

ArtifactManifest contains immutable release artifact identity.

func DecodeArtifactManifest

func DecodeArtifactManifest(data []byte) (ArtifactManifest, error)

func (ArtifactManifest) Validate

func (manifest ArtifactManifest) Validate() error

type BinaryArtifact

type BinaryArtifact struct {
	Identity Identity `json:"identity"`
	Name     string   `json:"name"`
	Platform string   `json:"platform"`
	Location string   `json:"location"`
	SHA256   string   `json:"sha256"`
}

type Identity

type Identity struct {
	Version      string `json:"version"`
	Tag          string `json:"tag"`
	SourceCommit string `json:"sourceCommit"`
}

Identity is repeated on every independently inspectable release object.

type MicroVMArtifact

type MicroVMArtifact struct {
	Identity              Identity        `json:"identity"`
	ImageReference        string          `json:"imageReference"`
	SignedManifestDigest  string          `json:"signedManifestDigest"`
	SigningKeyFingerprint string          `json:"signingKeyFingerprint"`
	RuntimeBundle         SignedComponent `json:"runtimeBundle"`
	ToolchainBundle       SignedComponent `json:"toolchainBundle"`
}

type OCIArtifact

type OCIArtifact struct {
	Identity  Identity `json:"identity"`
	Reference string   `json:"reference"`
}

type OpenAPIArtifact

type OpenAPIArtifact struct {
	Identity Identity `json:"identity"`
	Reference
}

type PlatformMatrix

type PlatformMatrix struct {
	HostBinaries         []string `json:"hostBinaries"`
	ControlPlane         []string `json:"controlPlane"`
	Runner               []string `json:"runner"`
	Guest                []string `json:"guest"`
	QualifiedRunnerGuest []string `json:"qualifiedRunnerGuest"`
}

type ProtocolWindow

type ProtocolWindow struct {
	Minimum uint32 `json:"minimum"`
	Maximum uint32 `json:"maximum"`
}

type QualificationDeviceEvidence added in v0.2.0

type QualificationDeviceEvidence struct {
	Path     string `json:"path"`
	Present  bool   `json:"present"`
	Readable bool   `json:"readable"`
	Writable bool   `json:"writable"`
}

type QualificationEvidence added in v0.2.0

type QualificationEvidence struct {
	SchemaVersion    string                    `json:"schemaVersion"`
	SourceCommit     string                    `json:"sourceCommit"`
	RepositoryDirty  bool                      `json:"repositoryDirty"`
	Suite            string                    `json:"suite"`
	PassCount        int64                     `json:"passCount"`
	WallClockSeconds int64                     `json:"wallClockSeconds"`
	Host             QualificationHostEvidence `json:"host"`
	QualifiedAt      string                    `json:"qualifiedAt"`
}

func DecodeQualificationEvidence added in v0.2.0

func DecodeQualificationEvidence(data []byte) (QualificationEvidence, error)

func (QualificationEvidence) Validate added in v0.2.0

func (evidence QualificationEvidence) Validate() error

func (QualificationEvidence) ValidateForRelease added in v0.2.0

func (evidence QualificationEvidence) ValidateForRelease(sourceCommit string) error

type QualificationFilesystemEvidence added in v0.2.0

type QualificationFilesystemEvidence struct {
	Mount string `json:"mount"`
	Type  string `json:"type"`
}

type QualificationHostEvidence added in v0.2.0

type QualificationHostEvidence struct {
	KVM                 QualificationDeviceEvidence     `json:"kvm"`
	TUN                 QualificationDeviceEvidence     `json:"tun"`
	WorkspaceFilesystem QualificationFilesystemEvidence `json:"workspaceFilesystem"`
}

type Reference

type Reference struct {
	Location string `json:"location"`
	Digest   string `json:"digest"`
}

Reference identifies immutable bytes at a public HTTPS location.

type SDKArtifact

type SDKArtifact struct {
	Identity   Identity  `json:"identity"`
	Coordinate string    `json:"coordinate"`
	Package    Reference `json:"package"`
}

type SignedComponent added in v0.1.3

type SignedComponent struct {
	ArtifactID             string   `json:"artifactId"`
	ManifestDigest         string   `json:"manifestDigest"`
	MandatoryGuestFeatures []string `json:"mandatoryGuestFeatures"`
}

SignedComponent is one independently selected component bound by the signed top-level microVM manifest.

type StandardBundleArtifact

type StandardBundleArtifact struct {
	Identity Identity                  `json:"identity"`
	Name     string                    `json:"name"`
	Document Reference                 `json:"document"`
	Profiles []StandardProfileIdentity `json:"profiles"`
}

type StandardProfileIdentity

type StandardProfileIdentity struct {
	Name       string `json:"name"`
	Revision   int64  `json:"revision"`
	SpecDigest string `json:"specDigest"`
}

Jump to

Keyboard shortcuts

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