MCPcopy Index your code
hub / github.com/anomalyco/opencode / write

Function write

packages/enterprise/src/core/storage.ts:22–31  ·  view source on GitHub ↗
(path: string, value: string)

Source from the content-addressed store, hash-verified

20 },
21
22 async write(path: string, value: string): Promise<void> {
23 const response = await client.fetch(`${base}/${path}`, {
24 method: "PUT",
25 body: value,
26 headers: {
27 "Content-Type": "application/json",
28 },
29 })
30 if (!response.ok) throw new Error(`Failed to write ${path}: ${response.status}`)
31 },
32
33 async remove(path: string): Promise<void> {
34 const response = await client.fetch(`${base}/${path}`, {

Callers 1

updateFunction · 0.70

Calls 4

adapterFunction · 0.85
fetchMethod · 0.80
writeMethod · 0.80
resolveFunction · 0.70

Tested by

no test coverage detected