@opencode-ai/plugin 0.0.0-snapshot-tui-plugins-202603112046 → 0.0.0-snapshot-tui-plugins-202603190008

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.
package/dist/example.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { Plugin } from "./index";
1
+ import { Plugin } from "./index.js";
2
2
  export declare const ExamplePlugin: Plugin;
package/dist/example.js CHANGED
@@ -1,4 +1,4 @@
1
- import { tool } from "./tool";
1
+ import { tool } from "./tool.js";
2
2
  export const ExamplePlugin = async (ctx) => {
3
3
  return {
4
4
  tool: {
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { Event, createOpencodeClient, Project, Model, Provider, Permission, UserMessage, Message, Part, Auth, Config as SDKConfig } from "@opencode-ai/sdk";
2
- import type { BunShell } from "./shell";
3
- import { type ToolDefinition } from "./tool";
4
- export * from "./tool";
2
+ import type { BunShell } from "./shell.js";
3
+ import { type ToolDefinition } from "./tool.js";
4
+ export * from "./tool.js";
5
5
  export type ProviderContext = {
6
6
  source: "env" | "config" | "custom" | "api";
7
7
  info: Provider;
@@ -20,6 +20,11 @@ export type Config = Omit<SDKConfig, "plugin"> & {
20
20
  plugin?: Array<string | [string, PluginOptions]>;
21
21
  };
22
22
  export type Plugin = (input: PluginInput, options?: PluginOptions) => Promise<Hooks>;
23
+ type Rule = {
24
+ key: string;
25
+ op: "eq" | "neq";
26
+ value: string;
27
+ };
23
28
  export type AuthHook = {
24
29
  provider: string;
25
30
  loader?: (auth: () => Promise<Auth>, provider: Provider) => Promise<Record<string, any>>;
@@ -32,7 +37,9 @@ export type AuthHook = {
32
37
  message: string;
33
38
  placeholder?: string;
34
39
  validate?: (value: string) => string | undefined;
40
+ /** @deprecated Use `when` instead */
35
41
  condition?: (inputs: Record<string, string>) => boolean;
42
+ when?: Rule;
36
43
  } | {
37
44
  type: "select";
38
45
  key: string;
@@ -42,7 +49,9 @@ export type AuthHook = {
42
49
  value: string;
43
50
  hint?: string;
44
51
  }>;
52
+ /** @deprecated Use `when` instead */
45
53
  condition?: (inputs: Record<string, string>) => boolean;
54
+ when?: Rule;
46
55
  }>;
47
56
  authorize(inputs?: Record<string, string>): Promise<AuthOuathResult>;
48
57
  } | {
@@ -54,7 +63,9 @@ export type AuthHook = {
54
63
  message: string;
55
64
  placeholder?: string;
56
65
  validate?: (value: string) => string | undefined;
66
+ /** @deprecated Use `when` instead */
57
67
  condition?: (inputs: Record<string, string>) => boolean;
68
+ when?: Rule;
58
69
  } | {
59
70
  type: "select";
60
71
  key: string;
@@ -64,7 +75,9 @@ export type AuthHook = {
64
75
  value: string;
65
76
  hint?: string;
66
77
  }>;
78
+ /** @deprecated Use `when` instead */
67
79
  condition?: (inputs: Record<string, string>) => boolean;
80
+ when?: Rule;
68
81
  }>;
69
82
  authorize?(inputs?: Record<string, string>): Promise<{
70
83
  type: "success";
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export * from "./tool";
1
+ export * from "./tool.js";
package/dist/shell.js CHANGED
@@ -0,0 +1 @@
1
+ export {};
package/dist/tui.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { createOpencodeClient as createOpencodeClientV2, Event as TuiEvent } from "@opencode-ai/sdk/v2";
2
2
  import type { CliRenderer, ParsedKey, Plugin as CorePlugin } from "@opentui/core";
3
- import type { Plugin as ServerPlugin, PluginOptions } from "./index";
3
+ import type { Plugin as ServerPlugin, PluginOptions } from "./index.js";
4
4
  export type { CliRenderer, SlotMode } from "@opentui/core";
5
5
  export type TuiRouteCurrent = {
6
6
  name: "home";
package/dist/tui.js CHANGED
@@ -0,0 +1 @@
1
+ export {};
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-202603112046",
4
+ "version": "0.0.0-snapshot-tui-plugins-202603190008",
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-202603112046",
29
+ "@opencode-ai/sdk": "0.0.0-snapshot-tui-plugins-202603190008",
30
30
  "zod": "4.1.8"
31
31
  },
32
32
  "peerDependencies": {
@@ -38,7 +38,7 @@
38
38
  }
39
39
  },
40
40
  "devDependencies": {
41
- "@opentui/core": "0.0.0-20260310-a34fbfd3",
41
+ "@opentui/core": "0.0.0-20260318-39211c40",
42
42
  "@tsconfig/node22": "22.0.2",
43
43
  "@types/node": "22.13.9",
44
44
  "typescript": "5.8.2",