manifest

package
v1.234.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

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 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