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
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DefaultConversationEventLog(config): DefaultConversationEventLog;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”DefaultConversationEventLog
Methods
Section titled “Methods”checkpoint()
Section titled “checkpoint()”checkpoint(session): Promise<void>;Persist the session as a checkpoint (called after significant events).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”ConversationEventLog.checkpoint
cleanup()
Section titled “cleanup()”cleanup(session): void;Clean up transient state (e.g., accumulated assistant text) from the session.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”record()
Section titled “record()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”shouldCheckpoint()
Section titled “shouldCheckpoint()”shouldCheckpoint(part): boolean;Whether a given stream part type should trigger a checkpoint save.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”boolean