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

Function syncAnnotation

package/src/utils/sync.ts:63–79  ·  view source on GitHub ↗
(
  endpoint: string,
  sessionId: string,
  annotation: Annotation
)

Source from the content-addressed store, hash-verified

61 * Returns the annotation with any server-assigned fields.
62 */
63export async function syncAnnotation(
64 endpoint: string,
65 sessionId: string,
66 annotation: Annotation
67): Promise<Annotation> {
68 const response = await fetch(`${endpoint}/sessions/${sessionId}/annotations`, {
69 method: "POST",
70 headers: { "Content-Type": "application/json" },
71 body: JSON.stringify(annotation),
72 });
73
74 if (!response.ok) {
75 throw new Error(`Failed to sync annotation: ${response.status}`);
76 }
77
78 return response.json();
79}
80
81/**
82 * Update an annotation on the server.

Callers 3

initSessionFunction · 0.90
syncLocalAnnotationsFunction · 0.90
PageFeedbackToolbarCSSFunction · 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…