@opencode-ai/plugin 0.0.0-snapshot-tui-plugins-202603251343 → 0.0.0-snapshot-tui-plugins-202603251937

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/tui.d.ts +33 -37
  2. package/package.json +2 -2
package/dist/tui.d.ts CHANGED
@@ -215,36 +215,6 @@ export type TuiApp = {
215
215
  type Frozen<Value> = Value extends (...args: never[]) => unknown ? Value : Value extends ReadonlyArray<infer Item> ? ReadonlyArray<Frozen<Item>> : Value extends object ? {
216
216
  readonly [Key in keyof Value]: Frozen<Value[Key]>;
217
217
  } : Value;
218
- export type TuiApi = {
219
- app: TuiApp;
220
- command: {
221
- register: (cb: () => TuiCommand[]) => () => void;
222
- trigger: (value: string) => void;
223
- };
224
- route: {
225
- register: (routes: TuiRouteDefinition[]) => () => void;
226
- navigate: (name: string, params?: Record<string, unknown>) => void;
227
- readonly current: TuiRouteCurrent;
228
- };
229
- ui: {
230
- Dialog: (props: TuiDialogProps) => JSX.Element;
231
- DialogAlert: (props: TuiDialogAlertProps) => JSX.Element;
232
- DialogConfirm: (props: TuiDialogConfirmProps) => JSX.Element;
233
- DialogPrompt: (props: TuiDialogPromptProps) => JSX.Element;
234
- DialogSelect: <Value = unknown>(props: TuiDialogSelectProps<Value>) => JSX.Element;
235
- toast: (input: TuiToast) => void;
236
- dialog: TuiDialogStack;
237
- };
238
- keybind: {
239
- match: (key: string, evt: ParsedKey) => boolean;
240
- print: (key: string) => string;
241
- create: (defaults: TuiKeybindMap, overrides?: Record<string, unknown>) => TuiKeybindSet;
242
- };
243
- readonly tuiConfig: Frozen<TuiConfigView>;
244
- kv: TuiKV;
245
- state: TuiState;
246
- theme: TuiTheme;
247
- };
248
218
  export type TuiSidebarMcpItem = {
249
219
  name: string;
250
220
  status: McpStatus["status"];
@@ -315,19 +285,45 @@ export type TuiWorkspace = {
315
285
  current: () => string | undefined;
316
286
  set: (workspaceID?: string) => void;
317
287
  };
318
- export type TuiHostPluginApi<Renderer = CliRenderer> = TuiApi & {
288
+ export type TuiPluginApi = {
289
+ app: TuiApp;
290
+ command: {
291
+ register: (cb: () => TuiCommand[]) => () => void;
292
+ trigger: (value: string) => void;
293
+ };
294
+ route: {
295
+ register: (routes: TuiRouteDefinition[]) => () => void;
296
+ navigate: (name: string, params?: Record<string, unknown>) => void;
297
+ readonly current: TuiRouteCurrent;
298
+ };
299
+ ui: {
300
+ Dialog: (props: TuiDialogProps) => JSX.Element;
301
+ DialogAlert: (props: TuiDialogAlertProps) => JSX.Element;
302
+ DialogConfirm: (props: TuiDialogConfirmProps) => JSX.Element;
303
+ DialogPrompt: (props: TuiDialogPromptProps) => JSX.Element;
304
+ DialogSelect: <Value = unknown>(props: TuiDialogSelectProps<Value>) => JSX.Element;
305
+ toast: (input: TuiToast) => void;
306
+ dialog: TuiDialogStack;
307
+ };
308
+ keybind: {
309
+ match: (key: string, evt: ParsedKey) => boolean;
310
+ print: (key: string) => string;
311
+ create: (defaults: TuiKeybindMap, overrides?: Record<string, unknown>) => TuiKeybindSet;
312
+ };
313
+ readonly tuiConfig: Frozen<TuiConfigView>;
314
+ kv: TuiKV;
315
+ state: TuiState;
316
+ theme: TuiTheme;
319
317
  client: OpencodeClient;
320
318
  scopedClient: (workspaceID?: string) => OpencodeClient;
321
319
  workspace: TuiWorkspace;
322
320
  event: TuiEventBus;
323
- renderer: Renderer;
324
- };
325
- export type TuiPluginApi<Renderer = CliRenderer> = TuiHostPluginApi<Renderer> & {
321
+ renderer: CliRenderer;
326
322
  slots: TuiSlots;
327
323
  lifecycle: TuiLifecycle;
328
324
  };
329
- export type TuiPlugin<Renderer = CliRenderer> = (api: TuiPluginApi<Renderer>, options: PluginOptions | undefined, meta: TuiPluginMeta) => Promise<void>;
330
- export type TuiPluginModule<Renderer = CliRenderer> = {
325
+ export type TuiPlugin = (api: TuiPluginApi, options: PluginOptions | undefined, meta: TuiPluginMeta) => Promise<void>;
326
+ export type TuiPluginModule = {
331
327
  server?: Plugin;
332
- tui?: TuiPlugin<Renderer>;
328
+ tui?: TuiPlugin;
333
329
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode-ai/plugin",
4
- "version": "0.0.0-snapshot-tui-plugins-202603251343",
4
+ "version": "0.0.0-snapshot-tui-plugins-202603251937",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "scripts": {
@@ -26,7 +26,7 @@
26
26
  "dist"
27
27
  ],
28
28
  "dependencies": {
29
- "@opencode-ai/sdk": "0.0.0-snapshot-tui-plugins-202603251343",
29
+ "@opencode-ai/sdk": "0.0.0-snapshot-tui-plugins-202603251937",
30
30
  "zod": "4.1.8"
31
31
  },
32
32
  "peerDependencies": {