返回 DeepSeek-Reasonix
recovery.go
根目录 / internal / event / recovery.go
1 package event
2
3 // RetryScope distinguishes connection+header retries, body-phase stream
4 // retries, and host-classified protocol recovery. Older clients ignore an
5 // unknown value and still render the generic retry state.
6 type RetryScope string
7
8 const (
9 RetryScopeHeaders RetryScope = "headers"
10 RetryScopeStream RetryScope = "stream"
11 RetryScopeProtocol RetryScope = "protocol"
12 )
13
14 // RecoveryStatus is a local UI projection, never provider-visible metadata.
15 type RecoveryStatus struct {
16 // State is local UI metadata and never provider-visible. Current executions
17 // use fact-only states such as unknown or interrupted; recovery_required is
18 // retained solely for decoding and displaying historical records.
19 State string `json:"state,omitempty"`
20 CallID string `json:"call_id,omitempty"`
21 AttemptID string `json:"attempt_id,omitempty"`
22 RequiresUserDecision bool `json:"requires_user_decision,omitempty"`
23 ReadOnly bool `json:"read_only,omitempty"`
24 Phase string `json:"phase,omitempty"`
25 Reason string `json:"reason,omitempty"`
26 NextAttemptAt int64 `json:"next_attempt_at,omitempty"`
27 WaitedMs int64 `json:"waited_ms,omitempty"`
28 WaitBudgetMs int64 `json:"wait_budget_ms,omitempty"`
29 Waiting bool `json:"waiting,omitempty"`
30 }
31
31 lines GO