Documentation
¶
Overview ¶
Package guestapi defines the versioned public contract exposed to restricted MVM programs. It contains policy only; worker bindings remain responsible for enforcing the contract for a particular execution profile.
Index ¶
Constants ¶
const ( PackageTools = "librecode/tools" PackageAgents = "librecode/agents" PackageWorkflow = "librecode/workflow" PackageArtifacts = "librecode/artifacts" PackageState = "librecode/state" LegacyPackageTools = "tools" )
Canonical guest import paths. Artifact and state packages reserve names; they do not imply that those capabilities are implemented yet.
Variables ¶
This section is empty.
Functions ¶
func ValidateWorkerContract ¶
ValidateWorkerContract rejects worker contracts that this binary cannot execute. Version 1 retains the legacy turn and durable package layouts; version 2 selects the canonical profile-aware manifest.
Types ¶
type Availability ¶
Availability describes whether a canonical function is part of a profile's Version2 contract. Implemented is false for functions reserved for a later epic phase; callers must receive ErrorUnsupported until that phase ships.
func AvailabilityManifest ¶
func AvailabilityManifest() []Availability
AvailabilityManifest returns the canonical function policy.
func (Availability) Available ¶
func (availability Availability) Available(profile Profile) bool
Available reports whether a function belongs to the selected profile. It does not report implementation readiness, which is represented separately.
type CapabilityErrorCode ¶
type CapabilityErrorCode string
CapabilityErrorCode is a stable machine-readable guest capability failure.
const ( ErrorUnavailable CapabilityErrorCode = "guest_capability_unavailable" // ErrorDenied means policy refused an otherwise supported capability. ErrorDenied CapabilityErrorCode = "guest_capability_denied" // ErrorUnsupported means the selected guest API/runtime does not implement the capability. ErrorUnsupported CapabilityErrorCode = "guest_capability_unsupported" // ErrorRecursive means a capability attempted to invoke the outer execute surface. ErrorRecursive CapabilityErrorCode = "guest_capability_recursive" )
type Profile ¶
type Profile string
Profile identifies an execution guarantee profile for capability policy.
type Version ¶
type Version string
Version identifies a guest API independently of any persisted source format.
const ( // Version1 is the currently deployed legacy guest API. Version1 Version = "1" // Version2 is the canonical unified package contract introduced by the // unified execute migration. Version2 Version = "2" // CurrentVersion is the version new unified executions will request once // profile-aware worker manifests are introduced. CurrentVersion = Version2 )