@opencode-ai/plugin 0.0.0-next-17074 → 0.0.0-next-17078
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.
|
@@ -1,13 +1,35 @@
|
|
|
1
|
-
import type { ConnectionInfo
|
|
1
|
+
import type { ConnectionInfo } from "@opencode-ai/client";
|
|
2
2
|
import type { IntegrationApi } from "@opencode-ai/client/effect/api";
|
|
3
3
|
import { Credential } from "@opencode-ai/schema/credential";
|
|
4
|
+
import { Form } from "@opencode-ai/schema/form";
|
|
4
5
|
import type { Effect, Scope } from "effect";
|
|
5
6
|
import type { Transform } from "./registration.js";
|
|
6
|
-
type IntegrationInputs = Record<string, string>;
|
|
7
7
|
type IntegrationRef = {
|
|
8
8
|
id: string;
|
|
9
9
|
name: string;
|
|
10
10
|
};
|
|
11
|
+
export interface IntegrationOAuthMethod {
|
|
12
|
+
readonly id: string;
|
|
13
|
+
readonly type: "oauth";
|
|
14
|
+
readonly label: string;
|
|
15
|
+
readonly form?: Form.Fields;
|
|
16
|
+
}
|
|
17
|
+
export interface IntegrationCommandMethod {
|
|
18
|
+
readonly id: string;
|
|
19
|
+
readonly type: "command";
|
|
20
|
+
readonly label: string;
|
|
21
|
+
readonly command: ReadonlyArray<string>;
|
|
22
|
+
}
|
|
23
|
+
export interface IntegrationKeyMethod {
|
|
24
|
+
readonly type: "key";
|
|
25
|
+
readonly label?: string;
|
|
26
|
+
readonly form?: Form.Fields;
|
|
27
|
+
}
|
|
28
|
+
export interface IntegrationEnvMethod {
|
|
29
|
+
readonly type: "env";
|
|
30
|
+
readonly names: ReadonlyArray<string>;
|
|
31
|
+
}
|
|
32
|
+
export type IntegrationMethod = IntegrationOAuthMethod | IntegrationCommandMethod | IntegrationKeyMethod | IntegrationEnvMethod;
|
|
11
33
|
export type IntegrationOAuthAuthorization = {
|
|
12
34
|
readonly url: string;
|
|
13
35
|
readonly instructions: string;
|
|
@@ -22,7 +44,7 @@ export type IntegrationOAuthAuthorization = {
|
|
|
22
44
|
export type IntegrationOAuthMethodRegistration = {
|
|
23
45
|
readonly integrationID: string;
|
|
24
46
|
readonly method: IntegrationOAuthMethod;
|
|
25
|
-
readonly authorize: (
|
|
47
|
+
readonly authorize: (answer: Form.Answer) => Effect.Effect<IntegrationOAuthAuthorization, unknown, Scope.Scope>;
|
|
26
48
|
readonly refresh?: (credential: Credential.OAuth) => Effect.Effect<Credential.OAuth, unknown>;
|
|
27
49
|
readonly label?: (credential: Credential.OAuth) => string | undefined;
|
|
28
50
|
};
|
|
@@ -1,12 +1,34 @@
|
|
|
1
|
-
import type { ConnectionInfo
|
|
1
|
+
import type { ConnectionInfo } from "@opencode-ai/client";
|
|
2
2
|
import type { IntegrationApi } from "@opencode-ai/client/promise/api";
|
|
3
3
|
import { Credential } from "@opencode-ai/schema/credential";
|
|
4
|
+
import { Form } from "@opencode-ai/schema/form";
|
|
4
5
|
import type { Transform } from "./registration.js";
|
|
5
|
-
type IntegrationInputs = Record<string, string>;
|
|
6
6
|
type IntegrationRef = {
|
|
7
7
|
id: string;
|
|
8
8
|
name: string;
|
|
9
9
|
};
|
|
10
|
+
export interface IntegrationOAuthMethod {
|
|
11
|
+
readonly id: string;
|
|
12
|
+
readonly type: "oauth";
|
|
13
|
+
readonly label: string;
|
|
14
|
+
readonly form?: Form.Fields;
|
|
15
|
+
}
|
|
16
|
+
export interface IntegrationCommandMethod {
|
|
17
|
+
readonly id: string;
|
|
18
|
+
readonly type: "command";
|
|
19
|
+
readonly label: string;
|
|
20
|
+
readonly command: ReadonlyArray<string>;
|
|
21
|
+
}
|
|
22
|
+
export interface IntegrationKeyMethod {
|
|
23
|
+
readonly type: "key";
|
|
24
|
+
readonly label?: string;
|
|
25
|
+
readonly form?: Form.Fields;
|
|
26
|
+
}
|
|
27
|
+
export interface IntegrationEnvMethod {
|
|
28
|
+
readonly type: "env";
|
|
29
|
+
readonly names: ReadonlyArray<string>;
|
|
30
|
+
}
|
|
31
|
+
export type IntegrationMethod = IntegrationOAuthMethod | IntegrationCommandMethod | IntegrationKeyMethod | IntegrationEnvMethod;
|
|
10
32
|
export type IntegrationOAuthAuthorization = {
|
|
11
33
|
readonly url: string;
|
|
12
34
|
readonly instructions: string;
|
|
@@ -21,7 +43,7 @@ export type IntegrationOAuthAuthorization = {
|
|
|
21
43
|
export type IntegrationOAuthMethodRegistration = {
|
|
22
44
|
readonly integrationID: string;
|
|
23
45
|
readonly method: IntegrationOAuthMethod;
|
|
24
|
-
readonly authorize: (
|
|
46
|
+
readonly authorize: (answer: Form.Answer) => Promise<IntegrationOAuthAuthorization>;
|
|
25
47
|
readonly refresh?: (credential: Credential.OAuth) => Promise<Credential.OAuth>;
|
|
26
48
|
readonly label?: (credential: Credential.OAuth) => string | undefined;
|
|
27
49
|
};
|
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-next-
|
|
4
|
+
"version": "0.0.0-next-17078",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"scripts": {
|
|
@@ -36,16 +36,16 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@ai-sdk/provider": "3.0.8",
|
|
39
|
-
"@opencode-ai/ai": "0.0.0-next-
|
|
40
|
-
"@opencode-ai/client": "0.0.0-next-
|
|
41
|
-
"@opencode-ai/schema": "0.0.0-next-
|
|
39
|
+
"@opencode-ai/ai": "0.0.0-next-17078",
|
|
40
|
+
"@opencode-ai/client": "0.0.0-next-17078",
|
|
41
|
+
"@opencode-ai/schema": "0.0.0-next-17078",
|
|
42
42
|
"@opencode-ai/sdk": "1.18.5",
|
|
43
43
|
"@standard-schema/spec": "1.1.0",
|
|
44
44
|
"effect": "4.0.0-beta.101",
|
|
45
45
|
"zod": "4.1.8"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@opencode-ai/theme": "0.0.0-next-
|
|
48
|
+
"@opencode-ai/theme": "0.0.0-next-17078",
|
|
49
49
|
"@opentui/core": ">=0.4.5",
|
|
50
50
|
"@opentui/keymap": ">=0.4.5",
|
|
51
51
|
"@opentui/solid": ">=0.4.5",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@opencode-ai/theme": "0.0.0-next-
|
|
72
|
+
"@opencode-ai/theme": "0.0.0-next-17078",
|
|
73
73
|
"@opentui/core": "0.4.5",
|
|
74
74
|
"@opentui/keymap": "0.4.5",
|
|
75
75
|
"@opentui/solid": "0.4.5",
|