Skip to content

DefaultConversationEventLog

Default conversation event log extracted from SessionEventManager + Runtime checkpoint logic.

Handles:

  • Recording stream parts into session working memory
  • Text-delta accumulation and flush on terminal events
  • Value truncation at depth 5 for safe serialization
  • Checkpoint determination and persistence
new DefaultConversationEventLog(config): DefaultConversationEventLog;
Parameter Type

config

DefaultConversationEventLogConfig

DefaultConversationEventLog

checkpoint(session): Promise<void>;

Persist the session as a checkpoint (called after significant events).

Parameter Type

session

Session

Promise<void>

ConversationEventLog.checkpoint


cleanup(session): void;

Clean up transient state (e.g., accumulated assistant text) from the session.

Parameter Type

session

Session

void

ConversationEventLog.cleanup


record(context, part): void;

Record a stream part into the session’s runtime event log. Text-deltas are accumulated; terminal events flush the assistant text.

Parameter Type

context

RunContext

part

HarnessStreamPart

void

ConversationEventLog.record


shouldCheckpoint(part): boolean;

Whether a given stream part type should trigger a checkpoint save.

Parameter Type

part

HarnessStreamPart

boolean

ConversationEventLog.shouldCheckpoint