MCPcopy
hub / github.com/anomalyco/opencode / registerAdapter

Function registerAdapter

packages/opencode/src/control-plane/adapters/index.ts:37–41  ·  view source on GitHub ↗
(projectID: ProjectV2.ID, type: string, adapter: WorkspaceAdapter)

Source from the content-addressed store, hash-verified

35// Plugins can be loaded per-project so we need to scope them. If you
36// want to install a global one pass `ProjectV2.ID.global`
37export function registerAdapter(projectID: ProjectV2.ID, type: string, adapter: WorkspaceAdapter) {
38 const adapters = state.get(projectID) ?? new Map<string, WorkspaceAdapter>()
39 adapters.set(type, adapter)
40 state.set(projectID, adapters)
41}

Callers 10

adapters.test.tsFile · 0.90
workspace.test.tsFile · 0.90
createWorkspaceFunction · 0.90
createLocalWorkspaceFunction · 0.90
createLocalWorkspaceFunction · 0.90
setupWorkspaceFunction · 0.90
registerFunction · 0.90

Calls 2

getMethod · 0.65
setMethod · 0.45

Tested by 5

createWorkspaceFunction · 0.72
createLocalWorkspaceFunction · 0.72
createLocalWorkspaceFunction · 0.72
setupWorkspaceFunction · 0.72