SessionLifecycle
When a session first saw each milestone, in epoch milliseconds on this
clock. Every value is null until its milestone happens. A session serves one
thread, so nothing is ever reset: a later session starts again from null.
Nothing here is stored or sent. The fields are the ones the LangGraph
session's lifecycle has, so one view reads either.
import type { SessionLifecycle } from '@threadplane/ag-ui';Declaration
export interface SessionLifecycle {
readonly interruptReceivedAt: number | null;
readonly interruptResolvedAt: number | null;
readonly streamErrorAt: {
readonly at: number;
readonly kind: AgentErrorKind;
} | null;
readonly streamStartedAt: number | null;
readonly threadCreatedAt: number | null;
readonly threadPersistedAt: number | null;
readonly toolCallCompletedAt: number | null;
readonly toolCallStartedAt: number | null;
}Members
interruptReceivedAt
The first time the session held a pending interrupt.
readonly interruptReceivedAt: number | null;interruptResolvedAt
The most recent resume the session accepted.
readonly interruptResolvedAt: number | null;streamErrorAt
The most recent failure the session published, with its error kind.
readonly streamErrorAt: {
readonly at: number;
readonly kind: AgentErrorKind;
} | null;streamStartedAt
The first event to arrive on any run's stream.
readonly streamStartedAt: number | null;threadCreatedAt
The first request of a session that named its own thread. Stays null for
a session given a threadId, on the option or on its agent.
readonly threadCreatedAt: number | null;threadPersistedAt
The first load that restored a saved thread, from replay or persistence.
readonly threadPersistedAt: number | null;toolCallCompletedAt
The first time a tool call was complete or failed.
readonly toolCallCompletedAt: number | null;toolCallStartedAt
The first time the session held a tool call, streamed or saved.
readonly toolCallStartedAt: number | null;