@opencode-ai/plugin 1.14.44 → 1.14.46

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 +41 -0
  2. package/package.json +2 -2
package/dist/tui.d.ts CHANGED
@@ -33,6 +33,40 @@ export type TuiKeys = {
33
33
  formatBindings: (bindings: readonly SequenceBindingLike[] | undefined) => string | undefined;
34
34
  };
35
35
  export type TuiKeymap = Keymap<Renderable, KeyEvent>;
36
+ /**
37
+ * Legacy `api.command` shape kept so v1 plugins can initialize. Remove in v2.
38
+ *
39
+ * @deprecated Use `api.keymap.registerLayer({ commands, bindings })` instead.
40
+ */
41
+ export type TuiCommand = {
42
+ title: string;
43
+ value: string;
44
+ description?: string;
45
+ category?: string;
46
+ keybind?: string;
47
+ suggested?: boolean;
48
+ hidden?: boolean;
49
+ enabled?: boolean;
50
+ slash?: {
51
+ name: string;
52
+ aliases?: string[];
53
+ };
54
+ onSelect?: (dialog?: TuiDialogStack) => void | Promise<void>;
55
+ };
56
+ /**
57
+ * Legacy `api.command` API kept so v1 plugins can initialize. Remove in v2.
58
+ *
59
+ * @deprecated Use `api.keymap.registerLayer`, `api.keymap.dispatchCommand`, and
60
+ * `api.keymap.dispatchCommand("command.palette.show")` instead.
61
+ */
62
+ export type TuiCommandApi = {
63
+ /** @deprecated Use `api.keymap.registerLayer({ commands, bindings })` instead. */
64
+ register: (cb: () => TuiCommand[]) => () => void;
65
+ /** @deprecated Use `api.keymap.dispatchCommand(name)` instead. */
66
+ trigger: (value: string) => void;
67
+ /** @deprecated Use `api.keymap.dispatchCommand("command.palette.show")` instead. */
68
+ show: () => void;
69
+ };
36
70
  export type TuiDialogProps = {
37
71
  size?: "medium" | "large" | "xlarge";
38
72
  onClose: () => void;
@@ -365,6 +399,13 @@ export type TuiWorkspace = {
365
399
  };
366
400
  export type TuiPluginApi = {
367
401
  app: TuiApp;
402
+ /**
403
+ * Legacy `api.command` API kept so v1 plugins can initialize. Remove in v2.
404
+ *
405
+ * @deprecated Use `api.keymap.registerLayer`, `api.keymap.dispatchCommand`, and
406
+ * `api.keymap.dispatchCommand("command.palette.show")` instead.
407
+ */
408
+ command?: TuiCommandApi;
368
409
  keys: TuiKeys;
369
410
  keymap: TuiKeymap;
370
411
  route: {
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": "1.14.44",
4
+ "version": "1.14.46",
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": "1.14.44",
29
+ "@opencode-ai/sdk": "1.14.46",
30
30
  "effect": "4.0.0-beta.59",
31
31
  "zod": "4.1.8"
32
32
  },