Versions in this module Expand all Collapse all v1 v1.0.0 Sep 28, 2026 Changes in this version + const DigestPrefix + const ErrCancelled + const ErrHostInvalidJSON + const ErrHostOutputTooLarge + const ErrHostProtocolViolation + const ErrHostSpawnFailed + const ErrHostTimeout + const ErrInternal + const ErrInvalidRequest + const ErrMissingRequirement + const ErrPathOutsideRoot + const ErrPermissionDenied + const ErrProviderFailure + const ErrTimeout + const ErrUnknownCapability + const ErrUnsupportedProtocol + const OperationDescribe + const OperationInvoke + const ProtocolID + const ProviderVaries + func DigestSHA256(content []byte) string + func IsAbsolutePath(p string) bool + func ValidDigest(s string) bool + func ValidateDescriptor(d *Descriptor) error + func ValidateEnvelope(e *Envelope, expectOperation, expectRequestID string) error + func ValidateExecutionAgainstDeclared(d *Descriptor, capabilityID string, e *Execution) error + type Artifact struct + Bytes int64 + Digest string + ID string + Kind string + MediaType string + Path string + Presentation string + Root string + Title string + type Capability struct + ArtifactSchemas []string + Effects Effects + ID string + LongRunning bool + PollCapability string + RequestSchema string + ResultSchema string + Skills []string + Summary string + Title string + type Descriptor struct + AgentOverlays []Overlay + ArtifactSchemas map[string]json.RawMessage + Capabilities []Capability + Module string + Name string + Permissions Permissions + ProtocolVersions []string + RequestSchemas map[string]json.RawMessage + Requirements []Requirement + ResultSchemas map[string]json.RawMessage + Skills []Skill + Version string + func (d *Descriptor) Normalize() + type Effects struct + CostKnown bool + ExternalWrites bool + Local bool + Network bool + Provider string + type Envelope struct + Error *Error + Execution Execution + Module string + OK bool + Operation string + Protocol string + RequestID string + Result json.RawMessage + Warnings []string + func DecodeEnvelope(stdout []byte) (*Envelope, error) + func NewDescribeEnvelope(d *Descriptor) (Envelope, error) + func NewErrorEnvelope(module, operation, requestID string, e Error, exec Execution) Envelope + func NewResultEnvelope(module, operation, requestID string, payload any, exec Execution) (Envelope, error) + func (e *Envelope) Normalize() + type Error struct + Code string + Details map[string]any + Message string + Retryable bool + type Execution struct + ActualCost *float64 + Artifacts []Artifact + EstimatedCost *float64 + ExternalWrites bool + Local bool + Network bool + Provider string + type Grants struct + Credentials []string + Network []string + PaidProviders []string + Publish bool + Subprocess []string + func (g *Grants) Normalize() + type Normalizer interface + Normalize func() + type Overlay struct + Digest string + ID string + Path string + Title string + Tokens int + type Permissions struct + Credentials []string + FilesystemRead []string + FilesystemWrite []string + Network []string + PaidProviders []string + Publish bool + Subprocess []string + func (p *Permissions) Normalize() + type Request struct + Binaries map[string]string + Capability string + DeadlineMS int + Extra map[string]json.RawMessage + Grants Grants + Input json.RawMessage + MaxOutputBytes int + Protocol string + RequestID string + Roots map[string]Root + func (r *Request) Normalize() + func (r Request) MarshalJSON() ([]byte, error) + type Requirement struct + Available bool + Detail string + Kind string + Name string + type Root struct + Mode string + Path string + type Skill struct + Digest string + ID string + Path string + Summary string + Title string + Tokens int + type ValidationError struct + Detail string + Path string + func CheckExecutionAgainstDeclared(d *Descriptor, capabilityID string, e *Execution) (warnings []ValidationError, err error) + func (e ValidationError) Error() string + type ValidationErrors []ValidationError + func (errs ValidationErrors) Error() string Other modules containing this package github.com/xibodev/compa/v2