Download packages/plugin/src/v2/effect/plugin.ts from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 465 Bytes
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/plugin/src/v2/effect/plugin.ts
- Command line
-
hf download hf://SaylorTwift/opencode/packages/plugin/src/v2/effect/plugin.ts
-
curl -L -o plugin.ts https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/plugin/src/v2/effect/plugin.ts
465 Bytes
| import type { Effect, Scope } from "effect" | |
| import type { PluginContext } from "./context.js" | |
| export interface Plugin<R = Scope.Scope> { | |
| readonly id: string | |
| readonly effect: (context: PluginContext) => Effect.Effect<void, never, R> | |
| } | |
| export function define<R = Scope.Scope>(plugin: Plugin<R>) { | |
| return plugin | |
| } | |
| export interface PluginDomain { | |
| readonly add: (plugin: Plugin) => Effect.Effect<void> | |
| readonly remove: (id: string) => Effect.Effect<void> | |
| } | |