@opencode-ai/plugin 0.0.0-snapshot-tui-plugins-202603201124 → 0.0.0-snapshot-tui-plugins-202603222200

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 +17 -4
  2. package/package.json +2 -2
package/dist/tui.d.ts CHANGED
@@ -47,7 +47,6 @@ export type TuiKeybindMap = Record<string, string>;
47
47
  export type TuiKeybindSet = {
48
48
  readonly all: TuiKeybindMap;
49
49
  get: (name: string) => string;
50
- parse: (evt: ParsedKey) => TuiKeybind;
51
50
  match: (name: string, evt: ParsedKey) => boolean;
52
51
  print: (name: string) => string;
53
52
  };
@@ -118,6 +117,19 @@ export type TuiTheme = {
118
117
  mode: () => "dark" | "light";
119
118
  readonly ready: boolean;
120
119
  };
120
+ export type TuiKV = {
121
+ get: <Value = unknown>(key: string, fallback?: Value) => Value;
122
+ set: (key: string, value: unknown) => void;
123
+ readonly ready: boolean;
124
+ };
125
+ export type TuiState = {
126
+ session: {
127
+ diff: (sessionID: string) => ReadonlyArray<TuiSidebarFileItem>;
128
+ todo: (sessionID: string) => ReadonlyArray<TuiSidebarTodoItem>;
129
+ };
130
+ lsp: () => ReadonlyArray<TuiSidebarLspItem>;
131
+ mcp: () => ReadonlyArray<TuiSidebarMcpItem>;
132
+ };
121
133
  export type TuiApi<Node = unknown> = {
122
134
  command: {
123
135
  register: (cb: () => TuiCommand[]) => void;
@@ -138,11 +150,12 @@ export type TuiApi<Node = unknown> = {
138
150
  dialog: TuiDialogStack<Node>;
139
151
  };
140
152
  keybind: {
141
- parse: (evt: ParsedKey) => TuiKeybind;
142
153
  match: (key: string, evt: ParsedKey) => boolean;
143
154
  print: (key: string) => string;
144
155
  create: (defaults: TuiKeybindMap, overrides?: Record<string, unknown>) => TuiKeybindSet;
145
156
  };
157
+ kv: TuiKV;
158
+ state: TuiState;
146
159
  theme: TuiTheme;
147
160
  };
148
161
  export type TuiSidebarMcpItem = {
@@ -245,7 +258,7 @@ export type TuiEventBus = {
245
258
  export type TuiPluginState = "first" | "updated" | "same";
246
259
  export type TuiPluginMeta = {
247
260
  name: string;
248
- source: "file" | "npm";
261
+ source: "file" | "npm" | "internal";
249
262
  spec: string;
250
263
  target: string;
251
264
  requested?: string;
@@ -268,7 +281,7 @@ export type TuiPluginInput<Renderer = CliRenderer, Node = unknown> = {
268
281
  slots: TuiSlots;
269
282
  api: TuiApi<Node>;
270
283
  };
271
- export type TuiPlugin<Renderer = CliRenderer, Node = unknown> = (input: TuiPluginInput<Renderer, Node>, options: PluginOptions | null, init: TuiPluginInit) => Promise<void>;
284
+ export type TuiPlugin<Renderer = CliRenderer, Node = unknown> = (input: TuiPluginInput<Renderer, Node>, options: PluginOptions | undefined, init: TuiPluginInit) => Promise<void>;
272
285
  export type TuiPluginModule<Renderer = CliRenderer, Node = unknown> = {
273
286
  server?: ServerPlugin;
274
287
  tui?: TuiPlugin<Renderer, Node>;
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-202603201124",
4
+ "version": "0.0.0-snapshot-tui-plugins-202603222200",
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-202603201124",
29
+ "@opencode-ai/sdk": "0.0.0-snapshot-tui-plugins-202603222200",
30
30
  "zod": "4.1.8"
31
31
  },
32
32
  "peerDependencies": {