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§
- Dispatch
Control - Everything a host may attach to one call to
SessionManager::dispatch. - FanOut
Observer - 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 onedispatchcall.DispatchControlonly carries oneArc<dyn SessionEventObserver>; this is how a host composes several into that one slot instead ofarabica-sessiongrowing a second observer field for every combination a host might want. - NewSession
- Metadata supplied when creating a session.
- Restore
Report - What
restore_sessionactually did, for a caller that wants to log or display it (a CLI’s--resumetelling the user “recovered N Events, repaired an interrupted run”, say) rather than re-deriving it from the session afterward. - Sequential
Ids - Session
Error - Session
Header - Durable session metadata.
- Session
Listing - Session metadata for listings, without reading the event history.
- Session
Manager - Session
Record - Session
Snapshot - A session’s replayed Event history, ready for
SessionManager::restore_session. Typically read back from aarabica-adaptersFileSessionStorefile, but this type carries no file-format knowledge itself – restoring only needs the Events in order, from wherever a caller got them. - Store
Error - Stored
Session
Enums§
- Event
Visibility - Whether an Event reached the client-visible subset
dispatchandhandlereturn, or was internal evidence such as amodel.response.item. - Store
Error Kind
Traits§
- IdAllocator
- Allocates Session and Run identifiers.
- Session
Event Observer - Receives every canonical Event as it is appended, in sequence order,
including internal ones. This is how a host streams progress:
dispatchitself returns only after the whole Command finishes, and internal Events such asmodel.response.itemnever appear in that return value at all. - Session
Store - 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.
- Session
Writer - 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
SessionEventObserverfor dispatch/recovery.