MCPcopy Create free account
hub / github.com/anomalyco/opencode / remoteAdapter

Function remoteAdapter

packages/opencode/test/server/httpapi-workspace.test.ts:106–129  ·  view source on GitHub ↗
(directory: string, url: string, headers?: HeadersInit)

Source from the content-addressed store, hash-verified

104}
105
106function remoteAdapter(directory: string, url: string, headers?: HeadersInit): WorkspaceAdapter {
107 return {
108 name: "Remote Test",
109 description: "Create a remote test workspace",
110 configure(info) {
111 return {
112 ...info,
113 name: "remote-test",
114 directory,
115 }
116 },
117 async create() {
118 await mkdir(directory, { recursive: true })
119 },
120 async remove() {},
121 target() {
122 return {
123 type: "remote" as const,
124 url,
125 headers,
126 }
127 },
128 }
129}
130
131type ProxiedRequest = {
132 url: string

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected