@opencode-ai/plugin 0.0.0-snapshot-tui-plugins-202603230058 → 0.0.0-snapshot-tui-plugins-202603231243

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 +7 -1
  2. package/package.json +2 -2
package/dist/tui.d.ts CHANGED
@@ -132,7 +132,7 @@ export type TuiState = {
132
132
  };
133
133
  export type TuiApi<Node = unknown> = {
134
134
  command: {
135
- register: (cb: () => TuiCommand[]) => void;
135
+ register: (cb: () => TuiCommand[]) => () => void;
136
136
  trigger: (value: string) => void;
137
137
  };
138
138
  route: {
@@ -255,6 +255,11 @@ export type TuiEventBus = {
255
255
  type: Type;
256
256
  }>) => void) => () => void;
257
257
  };
258
+ export type TuiDispose = () => void | Promise<void>;
259
+ export type TuiLifecycle = {
260
+ readonly signal: AbortSignal;
261
+ onDispose: (fn: TuiDispose) => () => void;
262
+ };
258
263
  export type TuiPluginState = "first" | "updated" | "same";
259
264
  export type TuiPluginMeta = {
260
265
  name: string;
@@ -280,6 +285,7 @@ export type TuiPluginInput<Renderer = CliRenderer, Node = unknown> = {
280
285
  renderer: Renderer;
281
286
  slots: TuiSlots;
282
287
  api: TuiApi<Node>;
288
+ lifecycle: TuiLifecycle;
283
289
  };
284
290
  export type TuiPlugin<Renderer = CliRenderer, Node = unknown> = (input: TuiPluginInput<Renderer, Node>, options: PluginOptions | undefined, init: TuiPluginInit) => Promise<void>;
285
291
  export type TuiPluginModule<Renderer = CliRenderer, Node = unknown> = {
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-202603230058",
4
+ "version": "0.0.0-snapshot-tui-plugins-202603231243",
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-202603230058",
29
+ "@opencode-ai/sdk": "0.0.0-snapshot-tui-plugins-202603231243",
30
30
  "zod": "4.1.8"
31
31
  },
32
32
  "peerDependencies": {