Versions in this module Expand all Collapse all v1 v1.1.0 May 22, 2026 Changes in this version + const ProtocolVersion + const SDKVersion + var ErrAgentNotAvailable = &Error + var ErrAgentVersionNotAvailable = &Error + var ErrBudgetExhausted = &Error + var ErrCancelled = &Error + var ErrDuplicateKey = &Error + var ErrHeartbeatLost = &Error + var ErrInternalError = &Error + var ErrInvalidRequest = &Error + var ErrJobNotFound = &Error + var ErrLeaseExpired = &Error + var ErrLeaseSubsetViolation = &Error + var ErrPermissionDenied = &Error + var ErrResumeWindowExpired = &Error + var ErrTimeout = &Error + var ErrUnauthenticated = &Error + var Features = []string + func HasFeature(features []string, name string) bool + func IntersectFeatures(a, b []string) []string + func IsRetryable(err error) bool + func MarshalPayload(payload any) (json.RawMessage, error) + func NewCallID() string + func NewEnvelopeID() string + func NewJobID() string + func NewPayloadForType(typ string) any + func NewPingNonce() string + func NewResultID() string + func NewSessionID() string + func NewTraceID() string + func NewULID() string + func RegisterMessageType(m MessageType) + func RegisteredTypes() []string + type BudgetAmount struct + Currency Currency + Value float64 + func ParseBudgetAmount(s string) (BudgetAmount, error) + func (b BudgetAmount) String() string + type Capability string + const CapAgentDelegate + const CapCostBudget + const CapFSRead + const CapFSWrite + const CapModelUse + const CapNetFetch + const CapToolCall + type Currency string + type Envelope struct + ARCP string + EventSeq uint64 + Extensions map[string]json.RawMessage + ID string + JobID string + Payload json.RawMessage + SessionID string + TraceID string + Type string + func NewEnvelope(typ string, payload any) (Envelope, error) + func (e *Envelope) DecodePayload(v any) error + func (e *Envelope) Validate() error + type Error struct + Code ErrorCode + Details map[string]any + Message string + Retryable bool + func Newf(code ErrorCode, format string, args ...any) *Error + func (e *Error) Error() string + func (e *Error) Is(target error) bool + func (e *Error) Unwrap() error + func (e *Error) WithCause(cause error) *Error + func (e *Error) WithDetails(details map[string]any) *Error + func (e *Error) WithMessage(msg string) *Error + type ErrorCode string + const CodeAgentNotAvailable + const CodeAgentVersionNotAvailable + const CodeBudgetExhausted + const CodeCancelled + const CodeDuplicateKey + const CodeHeartbeatLost + const CodeInternalError + const CodeInvalidRequest + const CodeJobNotFound + const CodeLeaseExpired + const CodeLeaseSubsetViolation + const CodePermissionDenied + const CodeResumeWindowExpired + const CodeTimeout + const CodeUnauthenticated + func Code(err error) ErrorCode + type Lease map[Capability][]string + func (l *Lease) UnmarshalJSON(data []byte) error + func (l Lease) Clone() Lease + func (l Lease) MarshalJSON() ([]byte, error) + type MessageType interface + ARCPType func() string