@@ -12,50 +12,51 @@ import (
1212
1313// runState 汇总单次 Run 生命周期内会变化的会话与计量状态。
1414type runState struct {
15- mu sync.Mutex
16- runID string
17- runToken uint64
18- session agentsession.Session
19- effectiveWorkdir string
20- compactCount int
21- reactiveCompactAttempts int
22- rememberedThisRun bool
23- planningEnabled bool
24- taskID string
25- agentID string
26- capabilityToken * security.CapabilityToken
27- nextAttemptSeq int
28- turn int
29- baseLifecycle controlplane.RunState
30- lifecycle controlplane.RunState
31- waitingPermissionCount int
32- compactingCount int
33- stopEmitted bool
34- budgetExceeded bool
35- maxTurnsReached bool
36- maxTurnsLimit int
37- userGoal string
15+ mu sync.Mutex
16+ runID string
17+ runToken uint64
18+ session agentsession.Session
19+ effectiveWorkdir string
20+ compactCount int
21+ reactiveCompactAttempts int
22+ rememberedThisRun bool
23+ planningEnabled bool
24+ taskID string
25+ agentID string
26+ capabilityToken * security.CapabilityToken
27+ nextAttemptSeq int
28+ turn int
29+ baseLifecycle controlplane.RunState
30+ lifecycle controlplane.RunState
31+ waitingPermissionCount int
32+ compactingCount int
33+ stopEmitted bool
34+ budgetExceeded bool
35+ maxTurnsReached bool
36+ maxTurnsLimit int
37+ userGoal string
3838 missingCompletionSignalStreak int
3939 pendingSystemReminder string
40- factsCollector * runtimefacts.Collector
41- terminalStatus controlplane.TerminalStatus
42- terminalStopReason controlplane.StopReason
43- terminalStopDetail string
44- terminalSet bool
45- hasUnknownUsage bool
46- completion controlplane.CompletionState
47- progress controlplane.ProgressState
48- lastEndOfTurnCheckpointID string
49- runCheckpointID string
50- hasRunWorkspaceWrite bool
51- hookAnnotations []string
52- hookNotifications []queuedHookNotification
53- hookNotificationSeen map [string ]time.Time
54- hookNotificationOmitted int
55- reportedMissingSkills map [string ]struct {}
56- thinkingOverride * ThinkingOverride
57- pendingUserQuestion * UserQuestionRequestedPayload
58- disableTools bool
40+ toolTimeoutBackoff map [string ]int
41+ factsCollector * runtimefacts.Collector
42+ terminalStatus controlplane.TerminalStatus
43+ terminalStopReason controlplane.StopReason
44+ terminalStopDetail string
45+ terminalSet bool
46+ hasUnknownUsage bool
47+ completion controlplane.CompletionState
48+ progress controlplane.ProgressState
49+ lastEndOfTurnCheckpointID string
50+ runCheckpointID string
51+ hasRunWorkspaceWrite bool
52+ hookAnnotations []string
53+ hookNotifications []queuedHookNotification
54+ hookNotificationSeen map [string ]time.Time
55+ hookNotificationOmitted int
56+ reportedMissingSkills map [string ]struct {}
57+ thinkingOverride * ThinkingOverride
58+ pendingUserQuestion * UserQuestionRequestedPayload
59+ disableTools bool
5960}
6061
6162// newRunState 基于持久化会话创建一次运行的内存状态镜像。
0 commit comments