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.events is the cursor of §TPD-8: at most 500 events after since, and the next cursor. With wait_ms it waits up to 30 s for the first new event.
  • session.start needs session.spawn, once per chat session.
  • session.send, session.interrupt and session.close need session.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 with holder.
  • session.claim, session.renew and session.release keep the session.write scope and never prompt: an engine claims and renews all the time, and a prompt would stop it.
  • session.adopt and session.export need session.spawn and session.write, and ask on every call (§TPN-7). An adopt also needs confirm_closed: the operator states that no terminal still runs the session (R10).

See also octomy::llmsession::SessionStore, octomy::llmsession::SessionRunner.

In this section