MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / getActiveSessions

Method getActiveSessions

server/src/db/si-db.ts:246–259  ·  view source on GitHub ↗
(hostIdentifier?: string)

Source from the content-addressed store, hash-verified

244 }
245
246 async getActiveSessions(hostIdentifier?: string): Promise<SiSession[]> {
247 let sql = "SELECT * FROM si_sessions WHERE status = 'active'";
248 const params: string[] = [];
249
250 if (hostIdentifier) {
251 sql += " AND host_identifier = $1";
252 params.push(hostIdentifier);
253 }
254
255 sql += " ORDER BY last_activity_at DESC";
256
257 const result = await query(sql, params);
258 return result.rows.map((row) => this.deserializeSession(row));
259 }
260
261 async getSessionsByUser(
262 userIdentifier: string,

Callers

nothing calls this directly

Calls 2

deserializeSessionMethod · 0.95
queryFunction · 0.85

Tested by

no test coverage detected