sjz-opencode-sdk 1.2.246 → 1.2.271
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 +13 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -61,6 +61,11 @@ export type PluginInput = {
|
|
|
61
61
|
unregisterSkill: (name: string) => Promise<void>;
|
|
62
62
|
};
|
|
63
63
|
export type Plugin = (input: PluginInput) => Promise<Hooks>;
|
|
64
|
+
type Rule = {
|
|
65
|
+
key: string;
|
|
66
|
+
op: "eq" | "neq";
|
|
67
|
+
value: string;
|
|
68
|
+
};
|
|
64
69
|
export type AuthHook = {
|
|
65
70
|
provider: string;
|
|
66
71
|
loader?: (auth: () => Promise<Auth>, provider: Provider) => Promise<Record<string, any>>;
|
|
@@ -73,7 +78,9 @@ export type AuthHook = {
|
|
|
73
78
|
message: string;
|
|
74
79
|
placeholder?: string;
|
|
75
80
|
validate?: (value: string) => string | undefined;
|
|
81
|
+
/** @deprecated Use `when` instead */
|
|
76
82
|
condition?: (inputs: Record<string, string>) => boolean;
|
|
83
|
+
when?: Rule;
|
|
77
84
|
} | {
|
|
78
85
|
type: "select";
|
|
79
86
|
key: string;
|
|
@@ -83,7 +90,9 @@ export type AuthHook = {
|
|
|
83
90
|
value: string;
|
|
84
91
|
hint?: string;
|
|
85
92
|
}>;
|
|
93
|
+
/** @deprecated Use `when` instead */
|
|
86
94
|
condition?: (inputs: Record<string, string>) => boolean;
|
|
95
|
+
when?: Rule;
|
|
87
96
|
}>;
|
|
88
97
|
authorize(inputs?: Record<string, string>): Promise<AuthOuathResult>;
|
|
89
98
|
} | {
|
|
@@ -95,7 +104,9 @@ export type AuthHook = {
|
|
|
95
104
|
message: string;
|
|
96
105
|
placeholder?: string;
|
|
97
106
|
validate?: (value: string) => string | undefined;
|
|
107
|
+
/** @deprecated Use `when` instead */
|
|
98
108
|
condition?: (inputs: Record<string, string>) => boolean;
|
|
109
|
+
when?: Rule;
|
|
99
110
|
} | {
|
|
100
111
|
type: "select";
|
|
101
112
|
key: string;
|
|
@@ -105,7 +116,9 @@ export type AuthHook = {
|
|
|
105
116
|
value: string;
|
|
106
117
|
hint?: string;
|
|
107
118
|
}>;
|
|
119
|
+
/** @deprecated Use `when` instead */
|
|
108
120
|
condition?: (inputs: Record<string, string>) => boolean;
|
|
121
|
+
when?: Rule;
|
|
109
122
|
}>;
|
|
110
123
|
authorize?(inputs?: Record<string, string>): Promise<{
|
|
111
124
|
type: "success";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "sjz-opencode-sdk",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.271",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"exports": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"dist"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@opencode-ai/sdk": "1.2.
|
|
21
|
+
"@opencode-ai/sdk": "1.2.27",
|
|
22
22
|
"zod": "4.1.8"
|
|
23
23
|
}
|
|
24
24
|
}
|