Versions in this module Expand all Collapse all v0 v0.1.0 Feb 24, 2026 Changes in this version + func AllRetryable(errs []error) bool + func AnyRetryable(errs []error) bool + func Cause(err error) error + func Collect(errs ...error) []error + func FirstRetryable(errs []error) error + func GetMetadata(err error) map[string]string + func Is(err error, code ErrorCode) bool + func IsCategory(err error, category ErrorCategory) bool + func IsInternal(err error) bool + func IsPermanent(err error) bool + func IsResource(err error) bool + func IsRetryable(err error) bool + func IsTransient(err error) bool + func Join(errs ...error) error + type AgentError interface + Category func() ErrorCategory + Code func() ErrorCode + Metadata func() map[string]string + Retryable func() bool + Unwrap func() error + func AsAgentError(err error) AgentError + type Error struct + func AgentOffline(agentID string, opts ...Option) *Error + func Conflict(message string, opts ...Option) *Error + func CoordinationFailure(message string, opts ...Option) *Error + func Forbidden(message string, opts ...Option) *Error + func FromCode(code ErrorCode, opts ...Option) *Error + func Internal(message string, opts ...Option) *Error + func InvalidInput(message string, opts ...Option) *Error + func New(code ErrorCode, message string, opts ...Option) *Error + func Newf(code ErrorCode, format string, args ...interface{}) *Error + func NotFound(message string, opts ...Option) *Error + func RateLimited(message string, opts ...Option) *Error + func RecoverPanic(recovered interface{}) *Error + func TaskFailed(taskID, reason string, opts ...Option) *Error + func Timeout(message string, opts ...Option) *Error + func Unauthorized(message string, opts ...Option) *Error + func Wrap(err error, message string, opts ...Option) *Error + func WrapWithCode(err error, code ErrorCode, message string, opts ...Option) *Error + func Wrapf(err error, format string, args ...interface{}) *Error + func (e *Error) AgentID() string + func (e *Error) Category() ErrorCategory + func (e *Error) Code() ErrorCode + func (e *Error) Error() string + func (e *Error) MarshalJSON() ([]byte, error) + func (e *Error) Metadata() map[string]string + func (e *Error) Retryable() bool + func (e *Error) TaskID() string + func (e *Error) Timestamp() time.Time + func (e *Error) UnmarshalJSON(data []byte) error + func (e *Error) Unwrap() error + type ErrorCategory string + const CategoryInternal + const CategoryPermanent + const CategoryResource + const CategoryTransient + func Category(err error) ErrorCategory + func (c ErrorCategory) IsRetryable() bool + func (c ErrorCategory) String() string + type ErrorCode string + const ErrCodeAgentBusy + const ErrCodeAgentOffline + const ErrCodeAlreadyExists + const ErrCodeAssertion + const ErrCodeCanceled + const ErrCodeCapabilityMissing + const ErrCodeCapacity + const ErrCodeConflict + const ErrCodeCoordination + const ErrCodeCorruption + const ErrCodeForbidden + const ErrCodeHandoffFailed + const ErrCodeInternal + const ErrCodeInvalidInput + const ErrCodeNetworkErr + const ErrCodeNotFound + const ErrCodePanic + const ErrCodePrecondition + const ErrCodeQuotaExceeded + const ErrCodeRateLimit + const ErrCodeResourceBusy + const ErrCodeRetryLater + const ErrCodeTaskFailed + const ErrCodeTimeout + const ErrCodeUnauthorized + const ErrCodeUnavailable + const ErrCodeUnsupported + func Code(err error) ErrorCode + func (c ErrorCode) DefaultCategory() ErrorCategory + func (c ErrorCode) DefaultRetryable() bool + func (c ErrorCode) Description() string + func (c ErrorCode) String() string + type Option func(*Error) + func WithAgentID(id string) Option + func WithCategory(cat ErrorCategory) Option + func WithCause(cause error) Option + func WithMetadata(key, value string) Option + func WithMetadataMap(m map[string]string) Option + func WithRetryable(retryable bool) Option + func WithTaskID(id string) Option + func WithTimestamp(t time.Time) Option