Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
Event string `json:"event"`
SessionID string `json:"session_id,omitempty"`
Fields map[string]any `json:"-"`
}
func (Event) MarshalJSON ¶ added in v0.1.0
func (*Event) UnmarshalJSON ¶ added in v0.1.0
type SessionState ¶ added in v0.15.0
type SessionState struct {
SessionID string `json:"session_id,omitempty"`
RunID string `json:"run_id,omitempty"`
Backend string `json:"backend,omitempty"`
Phase string `json:"phase,omitempty"`
ChannelReady bool `json:"channel_ready,omitempty"`
PromptQueued bool `json:"prompt_queued,omitempty"`
PromptSubmitted bool `json:"prompt_submitted,omitempty"`
WaitingPermission bool `json:"waiting_permission,omitempty"`
LastReportState string `json:"last_report_state,omitempty"`
LastReplyTo string `json:"last_reply_to,omitempty"`
FinishStatus string `json:"finish_status,omitempty"`
FinishSummary string `json:"finish_summary,omitempty"`
FilesChanged []string `json:"files_changed,omitempty"`
StopReason string `json:"stop_reason,omitempty"`
Ended bool `json:"ended,omitempty"`
LastEvent string `json:"last_event,omitempty"`
}
SessionState is a best-effort synthesized view of a live session derived from the raw event stream. It is transport-agnostic, but it preserves claude-channel-specific lifecycle signals when they are present.
type SessionTracker ¶ added in v0.15.0
type SessionTracker struct {
// contains filtered or unexported fields
}
SessionTracker incrementally derives SessionState from Avenor events.
func NewSessionTracker ¶ added in v0.15.0
func NewSessionTracker(sessionID string) *SessionTracker
func (*SessionTracker) Observe ¶ added in v0.15.0
func (t *SessionTracker) Observe(ev Event) bool
Observe applies one event to the tracker and reports whether the derived state changed.
func (*SessionTracker) Snapshot ¶ added in v0.15.0
func (t *SessionTracker) Snapshot() SessionState
Click to show internal directories.
Click to hide internal directories.