@opencode-ai/plugin 0.0.0-snapshot-tui-plugins-202603182124 → 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.
Files changed (2) hide show
  1. package/dist/index.d.ts +13 -0
  2. package/package.json +3 -3
package/dist/index.d.ts CHANGED
@@ -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/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-202603182124",
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-202603182124",
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-20260318-24c1a020",
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",