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" )
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.
Types ¶
type Availability ¶
Availability describes whether a canonical function is part of a profile's 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" )