@opencode/protocol 0.0.0-dev-21612 → 0.0.0-dev-21614
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/groups/mcp.d.ts +38 -38
- package/dist/groups/permission.d.ts +6 -6
- package/package.json +2 -2
package/dist/groups/mcp.d.ts
CHANGED
|
@@ -4,7 +4,36 @@ import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema } from
|
|
|
4
4
|
import { ForbiddenError, LocationNotFoundError, McpServerNotFoundError } from "../errors.js";
|
|
5
5
|
export declare const MCP_CLIENT_PATH = "/api/experimental/client-mcp";
|
|
6
6
|
export declare function hasMcpClientTicketURL(url: URL): boolean;
|
|
7
|
-
export declare const makeMcpGroup: <LocationId extends HttpApiMiddleware.AnyId, LocationService>(locationMiddleware: Context.Key<LocationId, LocationService>) => HttpApiGroup.HttpApiGroup<"server.mcp", HttpApiEndpoint.HttpApiEndpoint<"mcp.
|
|
7
|
+
export declare const makeMcpGroup: <LocationId extends HttpApiMiddleware.AnyId, LocationService>(locationMiddleware: Context.Key<LocationId, LocationService>) => HttpApiGroup.HttpApiGroup<"server.mcp", HttpApiEndpoint.HttpApiEndpoint<"mcp.add", "PUT", "/api/experimental/mcp/:server", Schema.toCodecStringTree<Schema.Struct<{
|
|
8
|
+
server: Schema.String;
|
|
9
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
10
|
+
readonly location: Schema.optional<Schema.Struct<{
|
|
11
|
+
readonly directory: Schema.optional<Schema.String>;
|
|
12
|
+
}>>;
|
|
13
|
+
}>>, Schema.toCodecJson<Schema.Struct<{
|
|
14
|
+
readonly config: Schema.toTaggedUnion<"type", readonly [typeof Mcp.LocalConfig, typeof Mcp.RemoteConfig]>;
|
|
15
|
+
}>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"mcp.clientToken", "POST", "/api/experimental/client-mcp/token", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
16
|
+
readonly location: Schema.optional<Schema.Struct<{
|
|
17
|
+
readonly directory: Schema.optional<Schema.String>;
|
|
18
|
+
}>>;
|
|
19
|
+
readonly name: Schema.String;
|
|
20
|
+
}>>, never, Schema.toCodecStringTree<Schema.Struct<{
|
|
21
|
+
readonly "x-opencode-ticket": Schema.optional<Schema.String>;
|
|
22
|
+
}>>, Schema.toCodecJson<Schema.Struct<{
|
|
23
|
+
readonly location: Schema.Struct<{
|
|
24
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
25
|
+
}>;
|
|
26
|
+
readonly data: Schema.Struct<{
|
|
27
|
+
readonly ticket: Schema.String;
|
|
28
|
+
readonly expires_in: Schema.Int;
|
|
29
|
+
}>;
|
|
30
|
+
}>>, Schema.toCodecJson<typeof ForbiddenError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"mcp.connect", "POST", "/api/experimental/mcp/:server/connect", Schema.toCodecStringTree<Schema.Struct<{
|
|
31
|
+
server: Schema.String;
|
|
32
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
33
|
+
readonly location: Schema.optional<Schema.Struct<{
|
|
34
|
+
readonly directory: Schema.optional<Schema.String>;
|
|
35
|
+
}>>;
|
|
36
|
+
}>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof McpServerNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"mcp.disconnect", "POST", "/api/experimental/mcp/:server/disconnect", Schema.toCodecStringTree<Schema.Struct<{
|
|
8
37
|
server: Schema.String;
|
|
9
38
|
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
10
39
|
readonly location: Schema.optional<Schema.Struct<{
|
|
@@ -35,7 +64,13 @@ export declare const makeMcpGroup: <LocationId extends HttpApiMiddleware.AnyId,
|
|
|
35
64
|
}>]>;
|
|
36
65
|
readonly integrationID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Integration.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Integration.ID">>, never, never>;
|
|
37
66
|
}>>;
|
|
38
|
-
}>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"mcp.
|
|
67
|
+
}>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"mcp.remove", "DELETE", "/api/experimental/mcp/:server", Schema.toCodecStringTree<Schema.Struct<{
|
|
68
|
+
server: Schema.String;
|
|
69
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
70
|
+
readonly location: Schema.optional<Schema.Struct<{
|
|
71
|
+
readonly directory: Schema.optional<Schema.String>;
|
|
72
|
+
}>>;
|
|
73
|
+
}>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof McpServerNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"mcp.resource.catalog", "GET", "/api/mcp/resource", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
39
74
|
readonly location: Schema.optional<Schema.Struct<{
|
|
40
75
|
readonly directory: Schema.optional<Schema.String>;
|
|
41
76
|
}>>;
|
|
@@ -59,42 +94,7 @@ export declare const makeMcpGroup: <LocationId extends HttpApiMiddleware.AnyId,
|
|
|
59
94
|
readonly mimeType: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
60
95
|
}>>;
|
|
61
96
|
}>;
|
|
62
|
-
}>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"mcp.
|
|
63
|
-
server: Schema.String;
|
|
64
|
-
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
65
|
-
readonly location: Schema.optional<Schema.Struct<{
|
|
66
|
-
readonly directory: Schema.optional<Schema.String>;
|
|
67
|
-
}>>;
|
|
68
|
-
}>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof McpServerNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"mcp.disconnect", "POST", "/api/experimental/mcp/:server/disconnect", Schema.toCodecStringTree<Schema.Struct<{
|
|
69
|
-
server: Schema.String;
|
|
70
|
-
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
71
|
-
readonly location: Schema.optional<Schema.Struct<{
|
|
72
|
-
readonly directory: Schema.optional<Schema.String>;
|
|
73
|
-
}>>;
|
|
74
|
-
}>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof McpServerNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"mcp.clientToken", "POST", "/api/experimental/client-mcp/token", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
75
|
-
readonly location: Schema.optional<Schema.Struct<{
|
|
76
|
-
readonly directory: Schema.optional<Schema.String>;
|
|
77
|
-
}>>;
|
|
78
|
-
readonly name: Schema.String;
|
|
79
|
-
}>>, never, Schema.toCodecStringTree<Schema.Struct<{
|
|
80
|
-
readonly "x-opencode-ticket": Schema.optional<Schema.String>;
|
|
81
|
-
}>>, Schema.toCodecJson<Schema.Struct<{
|
|
82
|
-
readonly location: Schema.Struct<{
|
|
83
|
-
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
84
|
-
}>;
|
|
85
|
-
readonly data: Schema.Struct<{
|
|
86
|
-
readonly ticket: Schema.String;
|
|
87
|
-
readonly expires_in: Schema.Int;
|
|
88
|
-
}>;
|
|
89
|
-
}>>, Schema.toCodecJson<typeof ForbiddenError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"mcp.add", "PUT", "/api/experimental/mcp/:server", Schema.toCodecStringTree<Schema.Struct<{
|
|
90
|
-
server: Schema.String;
|
|
91
|
-
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
92
|
-
readonly location: Schema.optional<Schema.Struct<{
|
|
93
|
-
readonly directory: Schema.optional<Schema.String>;
|
|
94
|
-
}>>;
|
|
95
|
-
}>>, Schema.toCodecJson<Schema.Struct<{
|
|
96
|
-
readonly config: Schema.toTaggedUnion<"type", readonly [typeof Mcp.LocalConfig, typeof Mcp.RemoteConfig]>;
|
|
97
|
-
}>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"mcp.client", "GET", "/api/experimental/client-mcp", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
97
|
+
}>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"mcp.client", "GET", "/api/experimental/client-mcp", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
98
98
|
readonly location: Schema.optional<Schema.Struct<{
|
|
99
99
|
readonly directory: Schema.optional<Schema.String>;
|
|
100
100
|
}>>;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { Context, Schema } from "effect";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema } from "effect/http-api";
|
|
3
3
|
import { ConflictError, LocationNotFoundError, PermissionNotFoundError, PermissionSavedNotFoundError, SessionNotFoundError } from "../errors.js";
|
|
4
|
-
export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.AnyId, LocationService, SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService>(locationMiddleware: Context.Key<LocationId, LocationService>, sessionLocationMiddleware: Context.Key<SessionLocationId, SessionLocationService>) => HttpApiGroup.HttpApiGroup<"server.permission", HttpApiEndpoint.HttpApiEndpoint<"permission.
|
|
4
|
+
export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.AnyId, LocationService, SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService>(locationMiddleware: Context.Key<LocationId, LocationService>, sessionLocationMiddleware: Context.Key<SessionLocationId, SessionLocationService>) => HttpApiGroup.HttpApiGroup<"server.permission", HttpApiEndpoint.HttpApiEndpoint<"permission.saved.remove", "DELETE", "/api/permission/saved/:id", Schema.toCodecStringTree<Schema.Struct<{
|
|
5
|
+
id: Schema.brand<Schema.String, "PermissionSaved.ID"> & {
|
|
6
|
+
create: () => string & import("effect/Brand").Brand<"PermissionSaved.ID">;
|
|
7
|
+
};
|
|
8
|
+
}>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"permission.request.list", "GET", "/api/permission/request", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
5
9
|
readonly location: Schema.optional<Schema.Struct<{
|
|
6
10
|
readonly directory: Schema.optional<Schema.String>;
|
|
7
11
|
}>>;
|
|
@@ -51,11 +55,7 @@ export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.
|
|
|
51
55
|
readonly updated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
52
56
|
}>;
|
|
53
57
|
}>>;
|
|
54
|
-
}>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"permission.saved.
|
|
55
|
-
id: Schema.brand<Schema.String, "PermissionSaved.ID"> & {
|
|
56
|
-
create: () => string & import("effect/Brand").Brand<"PermissionSaved.ID">;
|
|
57
|
-
};
|
|
58
|
-
}>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"permission.saved.update", "PATCH", "/api/permission/saved/:id", Schema.toCodecStringTree<Schema.Struct<{
|
|
58
|
+
}>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"permission.saved.update", "PATCH", "/api/permission/saved/:id", Schema.toCodecStringTree<Schema.Struct<{
|
|
59
59
|
id: Schema.brand<Schema.String, "PermissionSaved.ID"> & {
|
|
60
60
|
create: () => string & import("effect/Brand").Brand<"PermissionSaved.ID">;
|
|
61
61
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@opencode/protocol",
|
|
4
|
-
"version": "0.0.0-dev-
|
|
4
|
+
"version": "0.0.0-dev-21614",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"typecheck": "tsc --noEmit"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@opencode/schema": "0.0.0-dev-
|
|
36
|
+
"@opencode/schema": "0.0.0-dev-21614",
|
|
37
37
|
"effect": "4.0.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|