Returns the subset of claimed that belongs to the session now. Never throws: when a lookup
fails, nothing is kept.
The MJ: AI Agent Sessions id the claims were read from. The caller must have
checked that the session is the caller's own.
The run ids read from the session's Config.
The acting user; the lookups run as it only when no system user is cached.
The request-scoped metadata provider.
The claims that are records of the session.
Keeps the run ids from a session's
Configthat are records of that session.The session owner can edit
Config, so its run ids are claims. A run id is kept when it is the UUID of anMJ: AI Agent Runsrow whoseAgentSessionIDis the session. The step id and the prompt run id are kept when they belong to that co-agent run: the step'sAgentRunIDis the co-agent run, and the prompt run is theTargetLogIDof one of itsPromptsteps.The lookups run as the system user when one is cached, else as the acting user. They are pinned to the session's id and return nothing to the caller, and row-level security can hide a session's own runs from its owner (a web-widget guest's delegated runs carry no
ConversationID, which the guest's run filter keys on).Each call reads the database again (
BypassCache) and keeps no result, because the links can change after a lookup: a run'sAgentSessionIDand a step'sAgentRunIDandTargetLogIDare updatable.