@opencode/protocol 0.0.0-dev-19555 → 0.0.0-dev-19557

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.
@@ -4,7 +4,6 @@ import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi"
4
4
  export const LocationQuery = Schema.Struct({
5
5
  location: Schema.optional(Schema.Struct({
6
6
  directory: Schema.optional(Schema.String),
7
- workspace: Schema.optional(Schema.String),
8
7
  })),
9
8
  }).annotate({ identifier: "LocationQuery" });
10
9
  export const locationQueryOpenApi = OpenApi.annotations({
@@ -23,7 +22,7 @@ export const locationQueryOpenApi = OpenApi.annotations({
23
22
  export const LocationGroup = HttpApiGroup.make("server.location")
24
23
  .add(HttpApiEndpoint.get("location.get", "/api/location", {
25
24
  query: LocationQuery,
26
- success: Location.Info,
25
+ success: Location.PublicInfo,
27
26
  })
28
27
  .annotateMerge(locationQueryOpenApi)
29
28
  .annotateMerge(OpenApi.annotations({
@@ -1,15 +1,22 @@
1
1
  import { Mcp } from "@opencode/schema/mcp";
2
- import { Location } from "@opencode/schema/location";
3
2
  import { Schema } from "effect";
4
3
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/unstable/httpapi";
5
4
  import { McpServerNotFoundError } from "../errors.js";
6
5
  export declare const McpGroup: HttpApiGroup.HttpApiGroup<"server.mcp", HttpApiEndpoint.HttpApiEndpoint<"mcp.list", "GET", "/api/mcp", never, Schema.toCodecStringTree<Schema.Struct<{
7
6
  readonly location: Schema.optional<Schema.Struct<{
8
7
  readonly directory: Schema.optional<Schema.String>;
9
- readonly workspace: Schema.optional<Schema.String>;
10
8
  }>>;
11
9
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
12
- readonly location: typeof Location.Info;
10
+ readonly location: Schema.Struct<{
11
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
12
+ readonly project: Schema.Struct<{
13
+ readonly id: Schema.brand<Schema.String, "Project.ID"> & {
14
+ global: string & import("effect/Brand").Brand<"Project.ID">;
15
+ };
16
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
17
+ readonly canonical: Schema.brand<Schema.String, "AbsolutePath">;
18
+ }>;
19
+ }>;
13
20
  readonly data: Schema.$Array<Schema.Struct<{
14
21
  readonly name: Schema.String;
15
22
  readonly status: Schema.toTaggedUnion<"status", readonly [Schema.Struct<{
@@ -31,7 +38,6 @@ export declare const McpGroup: HttpApiGroup.HttpApiGroup<"server.mcp", HttpApiEn
31
38
  }>>, Schema.toCodecStringTree<Schema.Struct<{
32
39
  readonly location: Schema.optional<Schema.Struct<{
33
40
  readonly directory: Schema.optional<Schema.String>;
34
- readonly workspace: Schema.optional<Schema.String>;
35
41
  }>>;
36
42
  }>>, Schema.toCodecJson<Schema.Struct<{
37
43
  readonly config: Schema.toTaggedUnion<"type", readonly [typeof Mcp.LocalConfig, typeof Mcp.RemoteConfig]>;
@@ -40,29 +46,34 @@ export declare const McpGroup: HttpApiGroup.HttpApiGroup<"server.mcp", HttpApiEn
40
46
  }>>, Schema.toCodecStringTree<Schema.Struct<{
41
47
  readonly location: Schema.optional<Schema.Struct<{
42
48
  readonly directory: Schema.optional<Schema.String>;
43
- readonly workspace: Schema.optional<Schema.String>;
44
49
  }>>;
45
50
  }>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof McpServerNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"mcp.connect", "POST", "/api/mcp/:server/connect", Schema.toCodecStringTree<Schema.Struct<{
46
51
  server: Schema.String;
47
52
  }>>, Schema.toCodecStringTree<Schema.Struct<{
48
53
  readonly location: Schema.optional<Schema.Struct<{
49
54
  readonly directory: Schema.optional<Schema.String>;
50
- readonly workspace: Schema.optional<Schema.String>;
51
55
  }>>;
52
56
  }>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof McpServerNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"mcp.disconnect", "POST", "/api/mcp/:server/disconnect", Schema.toCodecStringTree<Schema.Struct<{
53
57
  server: Schema.String;
54
58
  }>>, Schema.toCodecStringTree<Schema.Struct<{
55
59
  readonly location: Schema.optional<Schema.Struct<{
56
60
  readonly directory: Schema.optional<Schema.String>;
57
- readonly workspace: Schema.optional<Schema.String>;
58
61
  }>>;
59
62
  }>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof McpServerNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"mcp.resource.catalog", "GET", "/api/mcp/resource", never, Schema.toCodecStringTree<Schema.Struct<{
60
63
  readonly location: Schema.optional<Schema.Struct<{
61
64
  readonly directory: Schema.optional<Schema.String>;
62
- readonly workspace: Schema.optional<Schema.String>;
63
65
  }>>;
64
66
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
65
- readonly location: typeof Location.Info;
67
+ readonly location: Schema.Struct<{
68
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
69
+ readonly project: Schema.Struct<{
70
+ readonly id: Schema.brand<Schema.String, "Project.ID"> & {
71
+ global: string & import("effect/Brand").Brand<"Project.ID">;
72
+ };
73
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
74
+ readonly canonical: Schema.brand<Schema.String, "AbsolutePath">;
75
+ }>;
76
+ }>;
66
77
  readonly data: Schema.Struct<{
67
78
  readonly resources: Schema.$Array<Schema.Struct<{
68
79
  readonly server: Schema.String;