Help us shape the future of Go! Take the 2026 Go Developer Survey

machine

package
v0.4.17 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ContractVersion = "v1"

Variables

This section is empty.

Functions

func CapabilitySpecifications

func CapabilitySpecifications() []string

func MCPTools added in v0.4.15

func MCPTools() []string

Types

type Error

type Error struct {
	Code        ErrorCode `json:"code"`
	Message     string    `json:"message"`
	CauseCode   string    `json:"cause,omitempty"`
	Retryable   bool      `json:"retryable,omitempty"`
	Next        string    `json:"next,omitempty"`
	Resource    string    `json:"resource,omitempty"`
	Remediation string    `json:"remediation_class,omitempty"`
	Cause       error     `json:"-"`
}

func Classify

func Classify(err error) *Error

func NewError

func NewError(code ErrorCode, message, next string, retryable bool) *Error

func Wrap

func Wrap(code ErrorCode, err error, next string, retryable bool) *Error

func (*Error) Error

func (e *Error) Error() string

func (*Error) Unwrap

func (e *Error) Unwrap() error

type ErrorCode

type ErrorCode string
const (
	ErrorValidationFailed      ErrorCode = "validation_failed"
	ErrorPortConflict          ErrorCode = "port_conflict"
	ErrorRequiredSecretMissing ErrorCode = "required_secret_missing"
	ErrorSourceMissing         ErrorCode = "source_missing"
	ErrorApprovalRequired      ErrorCode = "approval_required"
	ErrorWorkloadStartFailed   ErrorCode = "workload_start_failed"
	ErrorImagePullFailed       ErrorCode = "image_pull_failed"
	ErrorAuthenticationFailed  ErrorCode = "authentication_failed"
	ErrorInvalidWorkload       ErrorCode = "invalid_workload"
	ErrorCapabilityMissing     ErrorCode = "capability_missing"
	ErrorPolicyDenied          ErrorCode = "policy_denied"
	ErrorConflict              ErrorCode = "conflict"
	ErrorOwnershipAmbiguous    ErrorCode = "ownership_ambiguous"
	ErrorProviderUnavailable   ErrorCode = "provider_unavailable"
	ErrorRuntimeUnavailable    ErrorCode = "runtime_unavailable"
	ErrorTimeout               ErrorCode = "timeout"
	ErrorVerificationFailed    ErrorCode = "verification_failed"
	ErrorUnsupported           ErrorCode = "unsupported_operation"
	ErrorInternal              ErrorCode = "internal_error"
)

type ErrorResult

type ErrorResult struct {
	ContractVersion string `json:"contract_version"`
	Error           *Error `json:"error"`
}

func ResultError

func ResultError(err error) ErrorResult

type Operation

type Operation struct {
	ID                   string      `json:"id"`
	Description          string      `json:"description"`
	Safety               SafetyClass `json:"safety"`
	ConfirmationRequired bool        `json:"confirmation_required"`
	PolicyRequired       bool        `json:"policy_required"`
	ContractVersion      string      `json:"contract_version"`
	MCPTool              string      `json:"mcp_tool,omitempty"`
}

func OperationByID added in v0.4.15

func OperationByID(id string) (Operation, bool)

func Operations

func Operations() []Operation

type SafetyClass

type SafetyClass string
const (
	SafetyReadOnly    SafetyClass = "read_only"
	SafetyMutating    SafetyClass = "mutating"
	SafetyDestructive SafetyClass = "destructive"
)

Jump to

Keyboard shortcuts

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