@opencode-ai/protocol 0.0.0-next-15075 → 0.0.0-next-15077
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/event.d.ts +86 -0
- package/dist/groups/mcp.d.ts +23 -0
- package/dist/groups/mcp.js +11 -1
- package/package.json +2 -2
package/dist/groups/event.d.ts
CHANGED
|
@@ -6621,6 +6621,42 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
6621
6621
|
data: Schema.Struct<{
|
|
6622
6622
|
readonly version: Schema.String;
|
|
6623
6623
|
}>;
|
|
6624
|
+
}) | (Schema.Struct<{
|
|
6625
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
6626
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
6627
|
+
};
|
|
6628
|
+
readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
6629
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
6630
|
+
readonly type: Schema.Literal<"mcp.resources.changed">;
|
|
6631
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
6632
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
6633
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
6634
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
6635
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
6636
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
6637
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
6638
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
6639
|
+
}>, never, never>;
|
|
6640
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
6641
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
6642
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
6643
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
6644
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
6645
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
6646
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
6647
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
6648
|
+
}>, never, never>;
|
|
6649
|
+
}>>, never, never>;
|
|
6650
|
+
readonly data: Schema.Struct<{
|
|
6651
|
+
readonly server: Schema.String;
|
|
6652
|
+
}>;
|
|
6653
|
+
}> & {
|
|
6654
|
+
type: "mcp.resources.changed";
|
|
6655
|
+
durability: "ephemeral";
|
|
6656
|
+
durable: undefined;
|
|
6657
|
+
data: Schema.Struct<{
|
|
6658
|
+
readonly server: Schema.String;
|
|
6659
|
+
}>;
|
|
6624
6660
|
}) | (Schema.Struct<{
|
|
6625
6661
|
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
6626
6662
|
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
@@ -9966,6 +10002,20 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
9966
10002
|
readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
|
|
9967
10003
|
readonly workspaceID?: (string & import("effect/Brand").Brand<"WorkspaceV2.ID">) | undefined;
|
|
9968
10004
|
} | undefined;
|
|
10005
|
+
} | {
|
|
10006
|
+
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
10007
|
+
readonly created: import("effect/DateTime").Utc;
|
|
10008
|
+
readonly type: "mcp.resources.changed";
|
|
10009
|
+
readonly data: {
|
|
10010
|
+
readonly server: string;
|
|
10011
|
+
};
|
|
10012
|
+
readonly metadata?: {
|
|
10013
|
+
readonly [x: string]: unknown;
|
|
10014
|
+
} | undefined;
|
|
10015
|
+
readonly location?: {
|
|
10016
|
+
readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
|
|
10017
|
+
readonly workspaceID?: (string & import("effect/Brand").Brand<"WorkspaceV2.ID">) | undefined;
|
|
10018
|
+
} | undefined;
|
|
9969
10019
|
} | {
|
|
9970
10020
|
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
9971
10021
|
readonly created: import("effect/DateTime").Utc;
|
|
@@ -16979,6 +17029,42 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
16979
17029
|
data: Schema.Struct<{
|
|
16980
17030
|
readonly version: Schema.String;
|
|
16981
17031
|
}>;
|
|
17032
|
+
}) | (Schema.Struct<{
|
|
17033
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
17034
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
17035
|
+
};
|
|
17036
|
+
readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
17037
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
17038
|
+
readonly type: Schema.Literal<"mcp.resources.changed">;
|
|
17039
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
17040
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
17041
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
17042
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
17043
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
17044
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
17045
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
17046
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
17047
|
+
}>, never, never>;
|
|
17048
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
17049
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
17050
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
17051
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
17052
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
17053
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
17054
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
17055
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
17056
|
+
}>, never, never>;
|
|
17057
|
+
}>>, never, never>;
|
|
17058
|
+
readonly data: Schema.Struct<{
|
|
17059
|
+
readonly server: Schema.String;
|
|
17060
|
+
}>;
|
|
17061
|
+
}> & {
|
|
17062
|
+
type: "mcp.resources.changed";
|
|
17063
|
+
durability: "ephemeral";
|
|
17064
|
+
durable: undefined;
|
|
17065
|
+
data: Schema.Struct<{
|
|
17066
|
+
readonly server: Schema.String;
|
|
17067
|
+
}>;
|
|
16982
17068
|
}) | (Schema.Struct<{
|
|
16983
17069
|
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
16984
17070
|
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
package/dist/groups/mcp.d.ts
CHANGED
|
@@ -27,4 +27,27 @@ export declare const McpGroup: HttpApiGroup.HttpApiGroup<"server.mcp", HttpApiEn
|
|
|
27
27
|
}>]>;
|
|
28
28
|
readonly integrationID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Integration.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Integration.ID">>, never, never>;
|
|
29
29
|
}>>;
|
|
30
|
+
}>>, HttpApiEndpoint.Json<never>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"mcp.resource.catalog", "GET", "/api/mcp/resource", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
31
|
+
readonly location: Schema.optional<Schema.Struct<{
|
|
32
|
+
readonly directory: Schema.optional<Schema.String>;
|
|
33
|
+
readonly workspace: Schema.optional<Schema.String>;
|
|
34
|
+
}>>;
|
|
35
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
36
|
+
readonly location: typeof Location.Info;
|
|
37
|
+
readonly data: Schema.Struct<{
|
|
38
|
+
readonly resources: Schema.$Array<Schema.Struct<{
|
|
39
|
+
readonly server: Schema.String;
|
|
40
|
+
readonly name: Schema.String;
|
|
41
|
+
readonly uri: Schema.String;
|
|
42
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
43
|
+
readonly mimeType: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
44
|
+
}>>;
|
|
45
|
+
readonly templates: Schema.$Array<Schema.Struct<{
|
|
46
|
+
readonly server: Schema.String;
|
|
47
|
+
readonly name: Schema.String;
|
|
48
|
+
readonly uriTemplate: Schema.String;
|
|
49
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
50
|
+
readonly mimeType: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
51
|
+
}>>;
|
|
52
|
+
}>;
|
|
30
53
|
}>>, HttpApiEndpoint.Json<never>, never, never>, false>;
|
package/dist/groups/mcp.js
CHANGED
|
@@ -14,4 +14,14 @@ export const McpGroup = HttpApiGroup.make("server.mcp")
|
|
|
14
14
|
summary: "List MCP servers",
|
|
15
15
|
description: "Retrieve configured MCP servers and their connection status.",
|
|
16
16
|
})))
|
|
17
|
-
.
|
|
17
|
+
.add(HttpApiEndpoint.get("mcp.resource.catalog", "/api/mcp/resource", {
|
|
18
|
+
query: LocationQuery,
|
|
19
|
+
success: Location.response(Mcp.ResourceCatalog),
|
|
20
|
+
})
|
|
21
|
+
.annotateMerge(locationQueryOpenApi)
|
|
22
|
+
.annotateMerge(OpenApi.annotations({
|
|
23
|
+
identifier: "v2.mcp.resource.catalog",
|
|
24
|
+
summary: "List MCP resources",
|
|
25
|
+
description: "Retrieve resources and resource templates from connected MCP servers.",
|
|
26
|
+
})))
|
|
27
|
+
.annotateMerge(OpenApi.annotations({ title: "mcp", description: "MCP server and resource routes." }));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@opencode-ai/protocol",
|
|
4
|
-
"version": "0.0.0-next-
|
|
4
|
+
"version": "0.0.0-next-15077",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"typecheck": "tsgo --noEmit"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@opencode-ai/schema": "0.0.0-next-
|
|
29
|
+
"@opencode-ai/schema": "0.0.0-next-15077",
|
|
30
30
|
"effect": "4.0.0-beta.83"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|