feat(plugin): add v2 tui entrypoint

This commit is contained in:
Dax Raad 2026-07-13 23:08:34 -04:00
commit 9b8282ad3d
5 changed files with 23 additions and 2 deletions

View file

@ -105,7 +105,7 @@ export interface UI {
}
export interface Context {
readonly options: Record<string, any>
readonly options: Readonly<Record<string, unknown>>
readonly client: OpenCodeClient
readonly data: Data
readonly ui: UI

View file

@ -0,0 +1 @@
export * as Plugin from "./plugin.js"

View file

@ -0,0 +1,14 @@
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
}