manifest

package
v1.235.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 12 Imported by: 1 module, 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 manifest defines the statically readable plugin package contract.

Index

Constants

View Source
const Kind = "AtmosPluginConfig"

Variables

This section is empty.

Functions

func Executable

func Executable(definition *Config, platform string) string

Executable selects the executable a local build runs on a platform such as darwin/arm64: the platform entry when the manifest declares a usable one, otherwise the runtime executable.

func HostContractVersion

func HostContractVersion(contract string) uint32

HostContractVersion returns the single version of a contract this host speaks.

func LocalPath

func LocalPath(path string) bool

LocalPath rejects absolute and escaping paths before package access.

func ReadFile

func ReadFile(directory, name string) ([]byte, error)

ReadFile confines schema and manifest reads to the plugin package.

Types

type Compatibility

type Compatibility struct {
	Atmos     string            `yaml:"atmos,omitempty" json:"atmos,omitempty"`
	Protocol  string            `yaml:"protocol" json:"protocol"`
	Contracts map[string]string `yaml:"contracts,omitempty" json:"contracts,omitempty"`
}

Compatibility declares ranges consumed without starting the executable.

type Config

type Config = manifest.Manifest[Spec]

Config is a versioned Atmos manifest; loading it never executes plugin code.

func Load

func Load(directory string) (*Config, error)

Load reads a package manifest through a confined filesystem root.

func Parse

func Parse(raw []byte) (*Config, error)

Parse validates package metadata without opening files or executing code.

type Platform

type Platform struct {
	Executable string `yaml:"executable" json:"executable"`
	SHA256     string `yaml:"sha256,omitempty" json:"sha256,omitempty"`
}

Platform binds a precompiled executable to a digest.

type Runtime

type Runtime struct {
	Type       string `yaml:"type" json:"type"`
	Protocol   uint32 `yaml:"protocol" json:"protocol"`
	Executable string `yaml:"executable" json:"executable"`
}

Runtime selects the native protocol and default development executable.

type Spec

type Spec struct {
	Runtime       Runtime             `yaml:"runtime" json:"runtime"`
	Platforms     map[string]Platform `yaml:"platforms,omitempty" json:"platforms,omitempty"`
	Compatibility Compatibility       `yaml:"compatibility" json:"compatibility"`
	Capabilities  map[string]any      `yaml:"capabilities" json:"capabilities"`
	ConfigSchema  string              `yaml:"config_schema,omitempty" json:"config_schema,omitempty"`
}

Spec describes package runtime, platforms, compatibility, and extension metadata.

Jump to

Keyboard shortcuts

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