Skip to main content

Crate arabica_session

Crate arabica_session 

Source
Expand description

Session lifecycle and scheduling.

This module owns session/run identity, lifecycle state, dispatch, and monotonically ordered event envelopes. Runtime execution remains behind RuntimeEngine.

Structs§

DispatchControl
Everything a host may attach to one call to SessionManager::dispatch.
FanOutObserver
Forwards every Event to each observer in turn, in the order given, so a host can attach more than one – a persistent store (arabica-adapters’ FileSessionStore) alongside a live-progress observer, say – to one dispatch call. DispatchControl only carries one Arc<dyn SessionEventObserver>; this is how a host composes several into that one slot instead of arabica-session growing a second observer field for every combination a host might want.
NewSession
Metadata supplied when creating a session.
RestoreReport
What restore_session actually did, for a caller that wants to log or display it (a CLI’s --resume telling the user “recovered N Events, repaired an interrupted run”, say) rather than re-deriving it from the session afterward.
SequentialIds
SessionError
SessionHeader
Durable session metadata.
SessionListing
Session metadata for listings, without reading the event history.
SessionManager
SessionRecord
SessionSnapshot
A session’s replayed Event history, ready for SessionManager::restore_session. Typically read back from a arabica-adapters FileSessionStore file, but this type carries no file-format knowledge itself – restoring only needs the Events in order, from wherever a caller got them.
StoreError
StoredSession

Enums§

EventVisibility
Whether an Event reached the client-visible subset dispatch and handle return, or was internal evidence such as a model.response.item.
StoreErrorKind

Traits§

IdAllocator
Allocates Session and Run identifiers.
SessionEventObserver
Receives every canonical Event as it is appended, in sequence order, including internal ones. This is how a host streams progress: dispatch itself returns only after the whole Command finishes, and internal Events such as model.response.item never appear in that return value at all.
SessionStore
Backend-independent session repository. Hosts identify sessions by workspace and session IDs; database paths and migration belong to the implementation. Opening or creating a writer acquires exclusive ownership until its last handle is dropped. Read and list operations do not return ownership handles; adapters may perform migration before returning.
SessionWriter
An exclusively owned session’s write port. Adapters must atomically append an event and its metadata update, and reject mismatched identities or gaps. Hosts may upcast this handle to SessionEventObserver for dispatch/recovery.