MCPcopy
hub / github.com/rohitg00/agentmemory / post

Function post

plugin/opencode/agentmemory-capture.ts:17–28  ·  view source on GitHub ↗
(path: string, body: Record<string, unknown>, timeoutMs = 5000)

Source from the content-addressed store, hash-verified

15}
16
17async function post(path: string, body: Record<string, unknown>, timeoutMs = 5000): Promise<void> {
18 try {
19 await fetch(`${API}/agentmemory${path}`, {
20 method: "POST",
21 headers: authHeaders(),
22 body: JSON.stringify(body),
23 signal: AbortSignal.timeout(timeoutMs),
24 });
25 } catch (e) {
26 if (DEBUG) console.error(`[agentmemory] POST ${path} failed:`, (e as Error).message);
27 }
28}
29
30async function postJson(path: string, body: Record<string, unknown>): Promise<unknown | null> {
31 try {

Callers 2

observeFunction · 0.85
AgentmemoryCapturePluginFunction · 0.85

Calls 1

authHeadersFunction · 0.70

Tested by

no test coverage detected