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

Function register

packages/core/src/plugin/promise.ts:29–32  ·  view source on GitHub ↗
(effect: Effect.Effect<HostRegistration, never, Scope.Scope>)

Source from the content-addressed store, hash-verified

27
28 // Run a hook registration on the plugin scope and resolve once it is registered.
29 const register = (effect: Effect.Effect<HostRegistration, never, Scope.Scope>): Promise<Registration> =>
30 Effect.runPromiseWith(context)(Scope.provide(scope)(effect)).then((registration) => ({
31 dispose: () => Effect.runPromiseWith(context)(registration.dispose),
32 }))
33
34 const run = (effect: Effect.Effect<void>) => Effect.runPromiseWith(context)(effect)
35

Callers 3

transformFunction · 0.70
fromPromiseFunction · 0.70
copy.tsFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected