opencode/packages/plugin/src/v2/tui/plugin.ts
2026-07-13 23:08:34 -04:00

14 lines
319 B
TypeScript

import type { Context } from "./context.js"
export type { Context }
export type Cleanup = () => Promise<void> | void
export interface Definition {
readonly id: string
readonly setup: (context: Context) => Promise<Cleanup | void> | Cleanup | void
}
export function define(plugin: Definition) {
return plugin
}