Documentation
¶
Overview ¶
Package actionableerror owns the stable CLI/MCP recovery guidance envelope.
Index ¶
Constants ¶
const SchemaVersionV1 = "stackkit.actionable-error/v1"
Variables ¶
This section is empty.
Functions ¶
func WithDiagnostic ¶ added in v0.53.1
WithDiagnostic attaches a known condition at its construction boundary. The original error remains available for evidence and errors.Is/As; public text contains only the authority-owned cause.
Types ¶
type Contract ¶
type Contract struct {
SchemaVersion string `json:"schemaVersion"`
Code string `json:"code"`
ReasonCode string `json:"reasonCode"`
Message string `json:"message"`
UserGuidance []string `json:"userGuidance"`
Retryable bool `json:"retryable"`
// RetryAfter is the RFC 3339 UTC time an external authority named for the
// next attempt; it is omitted when no authority named one.
RetryAfter string `json:"retryAfter,omitempty"`
}
func Diagnostic ¶ added in v0.53.1
Diagnostic is a closed lookup, never a classification of arbitrary reason text. RetryAfter remains supplied by the observed external authority.
func Diagnostics ¶ added in v0.53.1
func Diagnostics() []Contract
Diagnostics is the deterministic projection used by the self-check plan and troubleshooting generator. A catalog entry is guidance, not measured health.
type RecordedFailure ¶ added in v0.53.1
type RecordedFailure struct {
Failure string `json:"failure"`
Reasons []string `json:"reasonCodes"`
}
func RecordedFailures ¶ added in v0.53.1
func RecordedFailures() []RecordedFailure
RecordedFailures indexes the historical terminal conditions to the same contracts; consumers never maintain a separate copy of this mapping.