BridgeSessionStore
Bridge SessionStore that splits concerns between CF and Kuralle.
CF owns messages (via AIChatAgent’s cf_ai_chat_agent_messages table). Kuralle owns orchestration state (via OrchestrationStore).
On get(): reconstructs a Session by combining CF’s messages with Kuralle’s orchestration state.
On save(): extracts orchestration state from the Session and saves it. Does NOT save messages — CF handles that via persistMessages().
Implements
Section titled “Implements”SessionStore
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BridgeSessionStore(options): BridgeSessionStore;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
Returns
Section titled “Returns”BridgeSessionStore
Methods
Section titled “Methods”cleanup()
Section titled “cleanup()”cleanup(maxAgeMs): Promise<number>;Garbage-collect orchestration rows older than maxAgeMs.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<number>
Implementation of
Section titled “Implementation of”SessionStore.cleanupdelete()
Section titled “delete()”delete(id): Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”SessionStore.deleteget(id): Promise<Session | null>;Reconstruct a Session from CF messages + orchestration state.
Keyed by id: multiple sessions (calls) per DO get isolated rows.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<Session | null>
Implementation of
Section titled “Implementation of”SessionStore.getlist()
Section titled “list()”list(): Promise<Session[]>;Returns
Section titled “Returns”Promise<Session[]>
Implementation of
Section titled “Implementation of”SessionStore.listsave()
Section titled “save()”save(session): Promise<void>;Save only orchestration state. CF handles message persistence.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”SessionStore.save