SessionDrivers: the human a Session acts for — the one who last started a run in it (a prompt in the app, the scheduler on its creator's behalf), else the owner of its Project. An agent's calls reach the server with the admin API token; this is how they are attributed to a person (whose own Chrome the agent then drives). The mechanism SessionDriverRegistry implements.
API
@Interface()
export abstract class SessionDrivers {
abstract note(sessionId: string, userId: string): void;
abstract driverOf(sessionId: string): string | null;
abstract runDriverOf(sessionId: string): string | null;
}Contract Topology
Static AST wiring across @Module / @Provide / @UseMembers (3)
note
note(sessionId: string, userId: string): voiduserId started a run in sessionId.
stringstringvoiddriverOf
driverOf(sessionId: string): string | nullThe human sessionId acts for; null for a Session the server does not know.
stringstring | nullrunDriverOf
runDriverOf(sessionId: string): string | nullThe person whose run is in progress in sessionId right now — the signed-in user who started
it (RuntimeEntry.runDriver) — or, for a subagent's Session, in its root; null when no run is
in progress, or the one in progress was started by nobody (the local API token, a schedule
without a creator, the Agent API, company mode, a goal, a compaction) or was steered by
someone else. Memory only: nothing is in progress after a restart. What a session-driver
plugin command runs as for an Agent.
stringstring | null