@opencode-ai/server 0.0.0-dev-18227 → 0.0.0-dev-18229
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/api.d.ts +57 -6
- package/dist/handlers/credential.js +3 -0
- package/package.json +6 -6
package/dist/api.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ export declare const Api: import("@opencode-ai/protocol/api").Api<LocationMiddle
|
|
|
39
39
|
};
|
|
40
40
|
readonly created: import("effect/Schema").Finite;
|
|
41
41
|
readonly metadata: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>>, import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>, never, never>;
|
|
42
|
-
readonly type: import("effect/Schema").Literal<"
|
|
42
|
+
readonly type: import("effect/Schema").Literal<"credential.updated">;
|
|
43
43
|
readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
|
|
44
44
|
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
45
45
|
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
@@ -61,7 +61,7 @@ export declare const Api: import("@opencode-ai/protocol/api").Api<LocationMiddle
|
|
|
61
61
|
}>>, never, never>;
|
|
62
62
|
readonly data: import("effect/Schema").Struct<{}>;
|
|
63
63
|
}> & {
|
|
64
|
-
type: "
|
|
64
|
+
type: "credential.updated";
|
|
65
65
|
durability: "ephemeral";
|
|
66
66
|
durable: undefined;
|
|
67
67
|
data: import("effect/Schema").Struct<{}>;
|
|
@@ -71,7 +71,7 @@ export declare const Api: import("@opencode-ai/protocol/api").Api<LocationMiddle
|
|
|
71
71
|
};
|
|
72
72
|
readonly created: import("effect/Schema").Finite;
|
|
73
73
|
readonly metadata: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>>, import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>, never, never>;
|
|
74
|
-
readonly type: import("effect/Schema").Literal<"
|
|
74
|
+
readonly type: import("effect/Schema").Literal<"credential.switched">;
|
|
75
75
|
readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
|
|
76
76
|
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
77
77
|
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
@@ -93,14 +93,52 @@ export declare const Api: import("@opencode-ai/protocol/api").Api<LocationMiddle
|
|
|
93
93
|
}>>, never, never>;
|
|
94
94
|
readonly data: import("effect/Schema").Struct<{
|
|
95
95
|
readonly integrationID: import("effect/Schema").brand<import("effect/Schema").String, "Integration.ID">;
|
|
96
|
+
readonly credentialID: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "Credential.ID"> & {
|
|
97
|
+
create: () => string & import("effect/Brand").Brand<"Credential.ID">;
|
|
98
|
+
}>;
|
|
96
99
|
}>;
|
|
97
100
|
}> & {
|
|
98
|
-
type: "
|
|
101
|
+
type: "credential.switched";
|
|
99
102
|
durability: "ephemeral";
|
|
100
103
|
durable: undefined;
|
|
101
104
|
data: import("effect/Schema").Struct<{
|
|
102
105
|
readonly integrationID: import("effect/Schema").brand<import("effect/Schema").String, "Integration.ID">;
|
|
106
|
+
readonly credentialID: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "Credential.ID"> & {
|
|
107
|
+
create: () => string & import("effect/Brand").Brand<"Credential.ID">;
|
|
108
|
+
}>;
|
|
103
109
|
}>;
|
|
110
|
+
}, import("effect/Schema").Struct<{
|
|
111
|
+
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
|
|
112
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
113
|
+
};
|
|
114
|
+
readonly created: import("effect/Schema").Finite;
|
|
115
|
+
readonly metadata: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>>, import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>, never, never>;
|
|
116
|
+
readonly type: import("effect/Schema").Literal<"integration.updated">;
|
|
117
|
+
readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
|
|
118
|
+
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
119
|
+
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
120
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
121
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
122
|
+
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
123
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
124
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
125
|
+
}>, never, never>;
|
|
126
|
+
}>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
|
|
127
|
+
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
128
|
+
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
129
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
130
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
131
|
+
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
132
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
133
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
134
|
+
}>, never, never>;
|
|
135
|
+
}>>, never, never>;
|
|
136
|
+
readonly data: import("effect/Schema").Struct<{}>;
|
|
137
|
+
}> & {
|
|
138
|
+
type: "integration.updated";
|
|
139
|
+
durability: "ephemeral";
|
|
140
|
+
durable: undefined;
|
|
141
|
+
data: import("effect/Schema").Struct<{}>;
|
|
104
142
|
}, import("effect/Schema").Struct<{
|
|
105
143
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
|
|
106
144
|
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
@@ -5984,7 +6022,7 @@ export declare const Api: import("@opencode-ai/protocol/api").Api<LocationMiddle
|
|
|
5984
6022
|
} | {
|
|
5985
6023
|
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
5986
6024
|
readonly data: {};
|
|
5987
|
-
readonly type: "
|
|
6025
|
+
readonly type: "credential.updated";
|
|
5988
6026
|
readonly created: number;
|
|
5989
6027
|
readonly location?: {
|
|
5990
6028
|
readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
|
|
@@ -5997,8 +6035,21 @@ export declare const Api: import("@opencode-ai/protocol/api").Api<LocationMiddle
|
|
|
5997
6035
|
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
5998
6036
|
readonly data: {
|
|
5999
6037
|
readonly integrationID: string & import("effect/Brand").Brand<"Integration.ID">;
|
|
6038
|
+
readonly credentialID: (string & import("effect/Brand").Brand<"Credential.ID">) | null;
|
|
6000
6039
|
};
|
|
6001
|
-
readonly type: "
|
|
6040
|
+
readonly type: "credential.switched";
|
|
6041
|
+
readonly created: number;
|
|
6042
|
+
readonly location?: {
|
|
6043
|
+
readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
|
|
6044
|
+
readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
|
|
6045
|
+
} | undefined;
|
|
6046
|
+
readonly metadata?: {
|
|
6047
|
+
readonly [x: string]: unknown;
|
|
6048
|
+
} | undefined;
|
|
6049
|
+
} | {
|
|
6050
|
+
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
6051
|
+
readonly data: {};
|
|
6052
|
+
readonly type: "integration.updated";
|
|
6002
6053
|
readonly created: number;
|
|
6003
6054
|
readonly location?: {
|
|
6004
6055
|
readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
|
|
@@ -5,6 +5,9 @@ import { Api } from "../api";
|
|
|
5
5
|
export const CredentialHandler = HttpApiBuilder.group(Api, "server.credential", (handlers) => handlers.handle("credential.update", Effect.fn(function* (ctx) {
|
|
6
6
|
yield* (yield* Integration.Service).connection.update(ctx.params.credentialID, { label: ctx.payload.label });
|
|
7
7
|
return HttpApiSchema.NoContent.make();
|
|
8
|
+
})).handle("credential.activate", Effect.fn(function* (ctx) {
|
|
9
|
+
yield* (yield* Integration.Service).connection.activate(ctx.params.credentialID);
|
|
10
|
+
return HttpApiSchema.NoContent.make();
|
|
8
11
|
})).handle("credential.remove", Effect.fn(function* (ctx) {
|
|
9
12
|
yield* (yield* Integration.Service).connection.remove(ctx.params.credentialID);
|
|
10
13
|
return HttpApiSchema.NoContent.make();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@opencode-ai/server",
|
|
4
|
-
"version": "0.0.0-dev-
|
|
4
|
+
"version": "0.0.0-dev-18229",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@effect/platform-node": "4.0.0-rc.111",
|
|
32
32
|
"@effect/platform-node-shared": "4.0.0-rc.111",
|
|
33
|
-
"@opencode-ai/core": "0.0.0-dev-
|
|
34
|
-
"@opencode-ai/protocol": "0.0.0-dev-
|
|
35
|
-
"@opencode-ai/schema": "0.0.0-dev-
|
|
36
|
-
"@opencode-ai/simulation": "0.0.0-dev-
|
|
37
|
-
"@opencode-ai/util": "0.0.0-dev-
|
|
33
|
+
"@opencode-ai/core": "0.0.0-dev-18229",
|
|
34
|
+
"@opencode-ai/protocol": "0.0.0-dev-18229",
|
|
35
|
+
"@opencode-ai/schema": "0.0.0-dev-18229",
|
|
36
|
+
"@opencode-ai/simulation": "0.0.0-dev-18229",
|
|
37
|
+
"@opencode-ai/util": "0.0.0-dev-18229",
|
|
38
38
|
"drizzle-orm": "1.0.0-rc.5-169397b",
|
|
39
39
|
"effect": "4.0.0-rc.111"
|
|
40
40
|
},
|