MCPcopy Create free account
hub / github.com/benjitaylor/agentation / getSession

Function getSession

package/src/utils/sync.ts:46–57  ·  view source on GitHub ↗
(
  endpoint: string,
  sessionId: string
)

Source from the content-addressed store, hash-verified

44 * Get an existing session with its annotations.
45 */
46export async function getSession(
47 endpoint: string,
48 sessionId: string
49): Promise<SessionWithAnnotations> {
50 const response = await fetch(`${endpoint}/sessions/${sessionId}`);
51
52 if (!response.ok) {
53 throw new Error(`Failed to get session: ${response.status}`);
54 }
55
56 return response.json();
57}
58
59/**
60 * Sync a new annotation to the server.

Callers 2

initSessionFunction · 0.90
syncLocalAnnotationsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…