BaseFutureSessionService

Java-friendly base for implementing a SessionService. Every method of the engine interface is suspend; this base final-overrides each and asks the Java subclass for a CompletableFuture instead. Return each future promptly and do any blocking work inside it, not before returning it. The two methods with default bodies (closeSession, appendEvent) keep those defaults reachable: leave the hook unoverridden and the engine's own behaviour runs.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
suspend override fun appendEvent(session: Session, event: Event): Event

Appends event to session, applying its state delta to the in-memory session and recording the event; temp: keys are applied to the in-memory state (so later agents in the invocation can read them) but removed from event before persistence.

Link copied to clipboard
suspend override fun closeSession(session: Session)

Closes a session.

Link copied to clipboard
suspend override fun createSession(key: SessionKey, state: Map<String, Any>? = null): Session

Creates a new session with the specified parameters.

Link copied to clipboard
suspend override fun deleteSession(key: SessionKey)

Deletes a specific session.

Link copied to clipboard
suspend override fun getSession(key: SessionKey, config: GetSessionConfig? = null): Session?

Retrieves a specific session, optionally filtering the events included.

Link copied to clipboard
suspend override fun listEvents(key: SessionKey): ListEventsResponse

Lists the events within a specific session.

Link copied to clipboard
suspend override fun listSessions(appName: String, userId: String): ListSessionsResponse

Lists sessions associated with a specific application and user.