Versions in this module Expand all Collapse all v0 v0.6.0 Dec 4, 2026 v0.5.0 Dec 2, 2026 Changes in this version + const APIVersion + const AdapterAPIVersion + const AdapterContractName + const BoundaryConfined + const BoundaryContainer + const BoundaryInProcess + const BoundaryKernel + const BoundaryProcess + const BoundaryRuntime + const DefaultProgressBytes + const DefaultProgressEvents + const DefaultReverseInFlight + const DefaultReversePayloadBytes + const DefaultTimeout + const FrameProgress + const FrameReverseRequest + const FrameReverseResponse + const MaxFrameBytes + const MaxProgressTextBytes + const MaxRetryAfterMilliseconds + const ReverseBusy + const ReverseDenied + const ReverseExpired + const ReverseTooLarge + const ReverseUnavailable + const ReverseUndeclared + var Boundaries = []string + var ErrAmbiguous = errors.New("multiple matching plugins") + var ErrClosed = errors.New("plugin session closed") + var ErrDenied = errors.New("plugin admission denied") + var ErrDraining = errors.New("plugin session draining") + var ErrInvalid = errors.New("invalid plugin contract") + var ErrMismatch = errors.New("plugin identity or contract mismatch") + var ErrNotFound = errors.New("no matching plugin") + var ErrProgressDropped = errors.New("plugin progress event dropped") + var ErrProtocol = errors.New("plugin protocol violation") + var ErrUnsupported = errors.New("unsupported plugin operation") + func ArtifactDigest(root, relative string, tree bool) (string, error) + func CheckRequirements(d Descriptor, requirements []Requirement) error + func Decode(data []byte, target any) error + func DirectoryDigest(root string) (string, error) + func MatchHandshake(selected, actual Descriptor) error + func Method(ref ContractRef, operation string) string + func NegotiateProtocol(preferred, offered []string) (string, error) + func PortablePath(value string) bool + func SplitProgressText(text string) []string + func TreeDigest(root, dir string) (string, error) + func ValidBoundary(b string) bool + func ValidIdentifier(s string) bool + func ValidRevision(s string) bool + func ValidateRequest(d Descriptor, r Request) error + func WithProgressLimits(ctx context.Context, limits *ProgressLimits) context.Context + func WithProgressReporter(ctx context.Context, r ProgressReporter) context.Context + func WithProgressSink(ctx context.Context, s ProgressSink) context.Context + func WithReverse(ctx context.Context, c ReverseCaller) context.Context + func WithSessionReverse(ctx context.Context, c ReverseCaller) context.Context + type AdapterInvocation struct + API string + Arguments []string + Command string + Name string + Operation string + Profile string + Project string + RealCommand string + Selection string + Values map[string]string + func ParseAdapterInvocation(args []string) (AdapterInvocation, error) + type Backend interface + Close func() error + type BackendProfile struct + Boundary string + Cancellation string + Concurrent bool + Name string + NativeCallbacks bool + NativeStreaming bool + ProcessOwner string + Protocols []string + func JSONLineProfile() BackendProfile + type CallOptions struct + Progress ProgressLimits + type Contract struct + Operations []Operation + type ContractRef struct + Name string + Version string + func (ref ContractRef) Validate() error + type Descriptor struct + APIVersion string + Contracts []Contract + Identity Identity + Reverse []Contract + func AdapterDescriptor(identity Identity, operations []string) Descriptor + func Select(candidates []Descriptor, want Requirement) (Descriptor, error) + func (d Descriptor) Clone() Descriptor + func (d Descriptor) Lookup(ref ContractRef, name string) (Operation, error) + func (d Descriptor) LookupReverse(ref ContractRef, name string) (Operation, error) + func (d Descriptor) ResolveMethod(method string) (ContractRef, string, error) + func (d Descriptor) Validate() error + type Endpoint interface + Handshake func(context.Context) (Descriptor, error) + Invoke func(context.Context, Request) (Response, error) + type Event struct + Code string + Contract ContractRef + Duration time.Duration + Identity Identity + Operation string + RequestID string + Stage string + type Guest struct + func NewGuest(descriptor Descriptor, opts GuestOptions) (*Guest, error) + func (g *Guest) Handshake(ctx context.Context) (Descriptor, error) + func (g *Guest) Invoke(ctx context.Context, request Request) (Response, error) + type GuestOptions struct + Handler Handler + MaxCallDuration time.Duration + type Handler func(context.Context, Request) (json.RawMessage, error) + type Identity struct + ID string + Revision string + Version string + func (id Identity) Validate() error + type Limiter struct + func NewLimiter(l ProgressLimits, now func() time.Time) *Limiter + func (l *Limiter) Admit(p Progress) (dropped uint64, ok bool) + func (l *Limiter) Carry(n uint64) + func (l *Limiter) Pending() uint64 + type Observer func(context.Context, Event) + type Operation struct + Name string + Progress bool + Surface string + type Options struct + Authorize func(context.Context, Request) error + Connect func(context.Context, Descriptor) (Backend, error) + Observer Observer + Requirements []Requirement + Reverse *ReverseOptions + Timeout time.Duration + Verify func(context.Context, Descriptor) error + type Progress struct + Completed uint64 + Dropped uint64 + Kind string + Stream string + Text string + Total uint64 + func (p Progress) Validate() error + type ProgressFrame struct + APIVersion string + Frame string + Parent string + func (f ProgressFrame) Validate() error + type ProgressLimits struct + BytesPerSecond int + EventsPerSecond int + func ProgressLimitsFrom(ctx context.Context) (limits ProgressLimits, ok bool) + func (l ProgressLimits) Resolved() ProgressLimits + func (l ProgressLimits) Validate() error + type ProgressReporter interface + Report func(Progress) error + func ProgressFrom(ctx context.Context) ProgressReporter + type ProgressSink interface + Deliver func(Progress) (delivered bool, err error) + func ProgressSinkFrom(ctx context.Context) ProgressSink + type RemoteError struct + Code string + Message string + RetryAfterMilliseconds int64 + func (e *RemoteError) Error() string + type Request struct + APIVersion string + Contract ContractRef + Deadline time.Time + ID string + Operation string + Parent string + Payload json.RawMessage + Plugin Identity + Progress *ProgressLimits + Surface string + func (r Request) Clone() Request + type Requirement struct + Contract ContractRef + Identity *Identity + Operation string + Provider string + type Response struct + APIVersion string + Error *RemoteError + ID string + Payload json.RawMessage + func (r Response) Validate(requestID string) error + type ReverseBackend interface + SetReverse func(ReverseHost) + type ReverseCaller interface + Call func(context.Context, ContractRef, string, json.RawMessage) (json.RawMessage, error) + func ReverseFrom(ctx context.Context) ReverseCaller + func SessionReverseFrom(ctx context.Context) ReverseCaller + type ReverseHost interface + AdmitReverse func(ReverseRequestFrame) (run func() ReverseResult, immediate *ReverseResult, err error) + type ReverseOptions struct + Authorize func(context.Context, Request) error + Handle Handler + MaxInFlight int + MaxPayloadBytes int + Timeout time.Duration + type ReverseRequestFrame struct + APIVersion string + Contract ContractRef + Deadline time.Time + Frame string + ID string + Operation string + Parent string + Payload json.RawMessage + func (f ReverseRequestFrame) Validate() error + type ReverseResponseFrame struct + APIVersion string + Error *RemoteError + Frame string + ID string + Payload json.RawMessage + func (f ReverseResponseFrame) Validate(id string) error + type ReverseResult struct + Error *RemoteError + Payload json.RawMessage + type Session struct + func Open(ctx context.Context, selected Descriptor, opts Options) (*Session, error) + func (s *Session) Abort() error + func (s *Session) AdmitReverse(frame ReverseRequestFrame) (func() ReverseResult, *ReverseResult, error) + func (s *Session) Call(ctx context.Context, contract ContractRef, operation string, ...) (json.RawMessage, error) + func (s *Session) CallProgress(ctx context.Context, contract ContractRef, operation string, ...) (json.RawMessage, error) + func (s *Session) Close(ctx context.Context) error + func (s *Session) Descriptor() Descriptor + func (s *Session) Done() <-chan struct{} + func (s *Session) State() State + type State string + const StateClosed + const StateDraining + const StateFailed + const StateReady