SessionManager

The lane bookkeeping of one Trove engine, on top of the door host's session runner (§OR-1, trove-parts §TPA-4).

Inherits QObject
Group libtrove

In the namespace octomy::trove. Declared in src/libs/libllmsession/llmsession/SessionManager.hpp.

Detailed description

startSession() acquires a driver with the Session capability from the DriverManager, with the lane's own request, and gives it to the door host's SessionRunner. The runner holds the process, records every event in sessions.db and serves the session to `session.*`, as it does for a session that `session.start` made. So one runner holds every live session of the host, and an external client follows a lane's session with `trove session follow`. When a worktree source is set and the request names a branch, the manager provisions a worktree for the session first. Each ISession signal comes out again from the manager, tagged with the session's SessionId, so the rest of Trove does not depend on the driver.

The scheduler, the operator surfaces and OPAL use the manager to start, steer and stop sessions: intervene(), interrupt(), switchModel(), answerAuth() and closeSession(). Each goes through the runner's code of `session.send`, `session.interrupt` and their kin, under the lane's lease `lane:<X>` (§TPN-6). An idle reaper closes sessions that stay unused for longer than a TTL; the default is one week. What the manager keeps itself is lane bookkeeping: the book, the crash-recovery resume and the steps of the cycle, which go into the store as `system` events.

TroveSupervisor creates one manager and is its QObject parent.

In this section