SessionActivity: the session runtime's in-use answers.
API
@Interface()
export abstract class SessionActivity {
abstract sessionInUse(sessionId: string): boolean;
abstract agentInUse(projectId: string, agentId: string): boolean;
}Contract Topology
Static AST wiring across @Module / @Provide / @UseMembers (2)
sessionInUse
sessionInUse(sessionId: string): booleanA Task or a compaction under way, input queued behind one, a background process or subagent still running, or the Session being deleted. A subagent child runs inside its root's runtime, so it is in use while its root is. A Session that is not loaded is not in use, and nothing loads it without a Task starting through the Session's lock — so a caller that asks this and acts in the same synchronous step cannot be overtaken by a Task.
@paramsessionId
string@returns
booleanagentInUse
agentInUse(projectId: string, agentId: string): booleanAny Session of the Agent in use — one of its own, or a subagent child of another Agent's Session that runs as this Agent — or the Agent being deleted. What the Agent's shared folders (its tool environments) wait on.
@paramprojectId
string@paramagentId
string@returns
boolean