@ex-machina/opencode-plugin 1.2.27002 → 1.3.2001
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/index.d.ts +15 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,11 @@ export type PluginInput = {
|
|
|
18
18
|
$: BunShell;
|
|
19
19
|
};
|
|
20
20
|
export type Plugin = (input: PluginInput) => Promise<Hooks>;
|
|
21
|
+
type Rule = {
|
|
22
|
+
key: string;
|
|
23
|
+
op: "eq" | "neq";
|
|
24
|
+
value: string;
|
|
25
|
+
};
|
|
21
26
|
export type AuthHook = {
|
|
22
27
|
provider: string;
|
|
23
28
|
loader?: (auth: () => Promise<Auth>, provider: Provider) => Promise<Record<string, any>>;
|
|
@@ -30,7 +35,9 @@ export type AuthHook = {
|
|
|
30
35
|
message: string;
|
|
31
36
|
placeholder?: string;
|
|
32
37
|
validate?: (value: string) => string | undefined;
|
|
38
|
+
/** @deprecated Use `when` instead */
|
|
33
39
|
condition?: (inputs: Record<string, string>) => boolean;
|
|
40
|
+
when?: Rule;
|
|
34
41
|
} | {
|
|
35
42
|
type: "select";
|
|
36
43
|
key: string;
|
|
@@ -40,7 +47,9 @@ export type AuthHook = {
|
|
|
40
47
|
value: string;
|
|
41
48
|
hint?: string;
|
|
42
49
|
}>;
|
|
50
|
+
/** @deprecated Use `when` instead */
|
|
43
51
|
condition?: (inputs: Record<string, string>) => boolean;
|
|
52
|
+
when?: Rule;
|
|
44
53
|
}>;
|
|
45
54
|
authorize(inputs?: Record<string, string>): Promise<AuthOuathResult>;
|
|
46
55
|
} | {
|
|
@@ -52,7 +61,9 @@ export type AuthHook = {
|
|
|
52
61
|
message: string;
|
|
53
62
|
placeholder?: string;
|
|
54
63
|
validate?: (value: string) => string | undefined;
|
|
64
|
+
/** @deprecated Use `when` instead */
|
|
55
65
|
condition?: (inputs: Record<string, string>) => boolean;
|
|
66
|
+
when?: Rule;
|
|
56
67
|
} | {
|
|
57
68
|
type: "select";
|
|
58
69
|
key: string;
|
|
@@ -62,7 +73,9 @@ export type AuthHook = {
|
|
|
62
73
|
value: string;
|
|
63
74
|
hint?: string;
|
|
64
75
|
}>;
|
|
76
|
+
/** @deprecated Use `when` instead */
|
|
65
77
|
condition?: (inputs: Record<string, string>) => boolean;
|
|
78
|
+
when?: Rule;
|
|
66
79
|
}>;
|
|
67
80
|
authorize?(inputs?: Record<string, string>): Promise<{
|
|
68
81
|
type: "success";
|
|
@@ -86,6 +99,7 @@ export type AuthOuathResult = {
|
|
|
86
99
|
access: string;
|
|
87
100
|
expires: number;
|
|
88
101
|
accountId?: string;
|
|
102
|
+
enterpriseUrl?: string;
|
|
89
103
|
} | {
|
|
90
104
|
key: string;
|
|
91
105
|
})) | {
|
|
@@ -101,6 +115,7 @@ export type AuthOuathResult = {
|
|
|
101
115
|
access: string;
|
|
102
116
|
expires: number;
|
|
103
117
|
accountId?: string;
|
|
118
|
+
enterpriseUrl?: string;
|
|
104
119
|
} | {
|
|
105
120
|
key: string;
|
|
106
121
|
})) | {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@ex-machina/opencode-plugin",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.3.2001",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"scripts": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@ex-machina/opencode-sdk": "1.
|
|
25
|
+
"@ex-machina/opencode-sdk": "1.3.2001",
|
|
26
26
|
"zod": "4.1.8"
|
|
27
27
|
},
|
|
28
28
|
"repository": {
|