MCPcopy
hub / github.com/benjitaylor/agentation / updateSessionStatus

Function updateSessionStatus

mcp/src/server/sqlite.ts:370–382  ·  view source on GitHub ↗
(id: string, status: SessionStatus)

Source from the content-addressed store, hash-verified

368 },
369
370 updateSessionStatus(id: string, status: SessionStatus): Session | undefined {
371 const updatedAt = new Date().toISOString();
372 const result = stmts.updateSessionStatus.run({ id, status, updatedAt });
373 if (result.changes === 0) return undefined;
374
375 const session = this.getSession(id);
376 if (session) {
377 const eventType: AFSEventType = status === "closed" ? "session.closed" : "session.updated";
378 const event = eventBus.emit(eventType, id, session);
379 persistEvent(event);
380 }
381 return session;
382 },
383
384 listSessions(): Session[] {
385 const rows = stmts.listSessions.all() as Record<string, unknown>[];

Callers

nothing calls this directly

Calls 3

persistEventFunction · 0.85
getSessionMethod · 0.80
emitMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…