SessionTask
The session.* OPAL task family: list, read and follow sessions, start them, send to them, interrupt and close them, and hold their leases (trove-parts §TPO-3).
In the namespace octomy::llmsession::opal. Declared in src/libs/libllmsessionopal/llmsessionopal/SessionTasks.hpp.
Detailed description
Each task works on one SessionStore and one SessionRunner, which the door host gives to registerSessionTasks(). The family is registered by hand, because it needs the store of the identity that the door host serves (§TPO-1).
- Reads (
session.list,session.get,session.events) carry no permission scope and never prompt.session.eventsis the cursor of §TPD-8: at most 500 events aftersince, and the next cursor. Withwait_msit waits up to 30 s for the first new event. session.startneedssession.spawn, once per chat session.session.send,session.interruptandsession.closeneedsession.write, once per chat session. Each also needs the caller's lease, or no live lease on the session (§TPN-6). The caller names itself withholder.session.claim,session.renewandsession.releasekeep thesession.writescope and never prompt: an engine claims and renews all the time, and a prompt would stop it.session.adoptandsession.exportneedsession.spawnandsession.write, and ask on every call (§TPN-7). An adopt also needsconfirm_closed: the operator states that no terminal still runs the session (R10).
See also octomy::llmsession::SessionStore, octomy::llmsession::SessionRunner.