works.iterative.claude.core.model.SessionState
See theSessionState companion object
case class SessionState(resultsSeen: Long = ..., notificationsSeen: Long = ..., lastResult: Option[ResultMessage] = ..., lastNotification: Option[ResultMessage] = ..., ended: Option[SessionEnd] = ...)
The session's activity state, folded from the message stream.
Read it to observe completion: resultsSeen is a monotone counter of real turn completions, so a predicate like resultsSeen > n is stable once true and readable at any time — there is no window to lose a race in. A background task finishing bumps notificationsSeen instead, so it can never wake a waiter for a real result.
Value parameters
- ended
-
set once the session's process has ended
- lastNotification
-
the most recent background-task result, if any
- lastResult
-
the most recent real result, if any
- notificationsSeen
-
monotone count of background-task results (wire
originkey present) - resultsSeen
-
monotone count of real results (wire
originkey absent)
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Members list
In this article