@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.
@@ -1,6 +1,7 @@
1
1
  import { Session } from "@opencode/schema/session";
2
2
  import { SessionMessage } from "@opencode/schema/session-message";
3
- import { Schema } from "effect";
3
+ import { Location } from "@opencode/schema/location";
4
+ import { Schema, Struct } from "effect";
4
5
  import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi";
5
6
  import { InvalidCursorError, SessionNotFoundError, UnknownError } from "../errors.js";
6
7
  export const SessionMessagesQuery = Schema.Struct({
@@ -28,12 +29,34 @@ export const SessionMessagesQuery = Schema.Struct({
28
29
  description: "Filter by message type before pagination. When omitted, all message types are returned. Pass the same type when following cursors.",
29
30
  }),
30
31
  }).annotate({ identifier: "SessionMessagesQuery" });
32
+ const PublicLocationSwitched = Schema.Struct({
33
+ ...Struct.omit(SessionMessage.LocationSwitched.fields, ["location", "previous"]),
34
+ location: Location.PublicRef,
35
+ previous: Schema.Struct({
36
+ location: Location.PublicRef,
37
+ projectID: SessionMessage.LocationSwitched.fields.projectID,
38
+ subpath: SessionMessage.LocationSwitched.fields.subpath,
39
+ }).pipe(Schema.optional),
40
+ }).annotate({ identifier: "Session.Message.LocationSwitched" });
41
+ export const PublicSessionMessage = Schema.Union([
42
+ SessionMessage.AgentSelected,
43
+ SessionMessage.ModelSelected,
44
+ PublicLocationSwitched,
45
+ SessionMessage.User,
46
+ SessionMessage.Synthetic,
47
+ SessionMessage.System,
48
+ SessionMessage.Skill,
49
+ SessionMessage.Shell,
50
+ SessionMessage.Assistant,
51
+ SessionMessage.Compaction,
52
+ SessionMessage.Idle,
53
+ ]).annotate({ identifier: "Session.Message.Info" });
31
54
  export const MessageGroup = HttpApiGroup.make("server.message")
32
55
  .add(HttpApiEndpoint.get("session.messages", "/api/session/:sessionID/message", {
33
56
  params: { sessionID: Session.ID },
34
57
  query: SessionMessagesQuery,
35
58
  success: Schema.Struct({
36
- data: Schema.Array(SessionMessage.Info),
59
+ data: Schema.Array(PublicSessionMessage),
37
60
  cursor: Schema.Struct({
38
61
  previous: Schema.String.pipe(Schema.optional),
39
62
  next: Schema.String.pipe(Schema.optional),
@@ -1,15 +1,22 @@
1
1
  import { Model } from "@opencode/schema/model";
2
- import { Location } from "@opencode/schema/location";
3
2
  import { Schema } from "effect";
4
3
  import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
5
4
  import { ServiceUnavailableError } from "../errors.js";
6
5
  export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpApiEndpoint.HttpApiEndpoint<"model.list", "GET", "/api/model", 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 capabilities: Schema.Struct<{
15
22
  readonly tools: Schema.Boolean;
@@ -160,10 +167,18 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
160
167
  }>>, Schema.toCodecJson<typeof ServiceUnavailableError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"model.default", "GET", "/api/model/default", never, Schema.toCodecStringTree<Schema.Struct<{
161
168
  readonly location: Schema.optional<Schema.Struct<{
162
169
  readonly directory: Schema.optional<Schema.String>;
163
- readonly workspace: Schema.optional<Schema.String>;
164
170
  }>>;
165
171
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
166
- readonly location: typeof Location.Info;
172
+ readonly location: Schema.Struct<{
173
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
174
+ readonly project: Schema.Struct<{
175
+ readonly id: Schema.brand<Schema.String, "Project.ID"> & {
176
+ global: string & import("effect/Brand").Brand<"Project.ID">;
177
+ };
178
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
179
+ readonly canonical: Schema.brand<Schema.String, "AbsolutePath">;
180
+ }>;
181
+ }>;
167
182
  readonly data: Schema.UndefinedOr<Schema.Struct<{
168
183
  readonly capabilities: Schema.Struct<{
169
184
  readonly tools: Schema.Boolean;
@@ -1,14 +1,21 @@
1
- import { Location } from "@opencode/schema/location";
2
1
  import { Context, Schema } from "effect";
3
2
  import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema } from "effect/unstable/httpapi";
4
3
  import { PermissionNotFoundError, SessionNotFoundError } from "../errors.js";
5
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.request.list", "GET", "/api/permission/request", never, Schema.toCodecStringTree<Schema.Struct<{
6
5
  readonly location: Schema.optional<Schema.Struct<{
7
6
  readonly directory: Schema.optional<Schema.String>;
8
- readonly workspace: Schema.optional<Schema.String>;
9
7
  }>>;
10
8
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
11
- readonly location: typeof Location.Info;
9
+ readonly location: Schema.Struct<{
10
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
11
+ readonly project: Schema.Struct<{
12
+ readonly id: Schema.brand<Schema.String, "Project.ID"> & {
13
+ global: string & import("effect/Brand").Brand<"Project.ID">;
14
+ };
15
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
16
+ readonly canonical: Schema.brand<Schema.String, "AbsolutePath">;
17
+ }>;
18
+ }>;
12
19
  readonly data: Schema.$Array<Schema.Struct<{
13
20
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
14
21
  create: () => string & import("effect/Brand").Brand<"SessionID">;
@@ -1,14 +1,21 @@
1
- import { Location } from "@opencode/schema/location";
2
1
  import { Schema } from "effect";
3
2
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/unstable/httpapi";
4
3
  import { InvalidRequestError, ServiceUnavailableError } from "../errors.js";
5
4
  export declare const PluginGroup: HttpApiGroup.HttpApiGroup<"server.plugin", HttpApiEndpoint.HttpApiEndpoint<"plugin.list", "GET", "/api/plugin", never, Schema.toCodecStringTree<Schema.Struct<{
6
5
  readonly location: Schema.optional<Schema.Struct<{
7
6
  readonly directory: Schema.optional<Schema.String>;
8
- readonly workspace: Schema.optional<Schema.String>;
9
7
  }>>;
10
8
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
11
- readonly location: typeof Location.Info;
9
+ readonly location: Schema.Struct<{
10
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
11
+ readonly project: Schema.Struct<{
12
+ readonly id: Schema.brand<Schema.String, "Project.ID"> & {
13
+ global: string & import("effect/Brand").Brand<"Project.ID">;
14
+ };
15
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
16
+ readonly canonical: Schema.brand<Schema.String, "AbsolutePath">;
17
+ }>;
18
+ }>;
12
19
  readonly data: Schema.$Array<Schema.Struct<{
13
20
  readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Plugin.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Plugin.ID">>, never, never>;
14
21
  readonly source: Schema.Union<readonly [Schema.Struct<{
@@ -41,17 +48,24 @@ export declare const PluginGroup: HttpApiGroup.HttpApiGroup<"server.plugin", Htt
41
48
  }>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"plugin.awaitActivation", "POST", "/api/plugin/await-activation", never, Schema.toCodecStringTree<Schema.Struct<{
42
49
  readonly location: Schema.optional<Schema.Struct<{
43
50
  readonly directory: Schema.optional<Schema.String>;
44
- readonly workspace: Schema.optional<Schema.String>;
45
51
  }>>;
46
52
  }>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"plugin.check", "POST", "/api/plugin/check", never, Schema.toCodecStringTree<Schema.Struct<{
47
53
  readonly location: Schema.optional<Schema.Struct<{
48
54
  readonly directory: Schema.optional<Schema.String>;
49
- readonly workspace: Schema.optional<Schema.String>;
50
55
  }>>;
51
56
  }>>, Schema.toCodecJson<Schema.Struct<{
52
57
  readonly target: Schema.optional<Schema.String>;
53
58
  }>>, never, Schema.toCodecJson<Schema.Struct<{
54
- readonly location: typeof Location.Info;
59
+ readonly location: Schema.Struct<{
60
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
61
+ readonly project: Schema.Struct<{
62
+ readonly id: Schema.brand<Schema.String, "Project.ID"> & {
63
+ global: string & import("effect/Brand").Brand<"Project.ID">;
64
+ };
65
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
66
+ readonly canonical: Schema.brand<Schema.String, "AbsolutePath">;
67
+ }>;
68
+ }>;
55
69
  readonly data: Schema.$Array<Schema.Struct<{
56
70
  readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Plugin.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Plugin.ID">>, never, never>;
57
71
  readonly source: Schema.Union<readonly [Schema.Struct<{
@@ -84,7 +98,6 @@ export declare const PluginGroup: HttpApiGroup.HttpApiGroup<"server.plugin", Htt
84
98
  }>>, Schema.toCodecJson<typeof InvalidRequestError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"plugin.update", "POST", "/api/plugin/update", never, Schema.toCodecStringTree<Schema.Struct<{
85
99
  readonly location: Schema.optional<Schema.Struct<{
86
100
  readonly directory: Schema.optional<Schema.String>;
87
- readonly workspace: Schema.optional<Schema.String>;
88
101
  }>>;
89
102
  }>>, Schema.toCodecJson<Schema.Struct<{
90
103
  readonly targets: Schema.$Array<Schema.String>;
@@ -1,15 +1,22 @@
1
1
  import { Provider } from "@opencode/schema/provider";
2
- import { Location } from "@opencode/schema/location";
3
2
  import { Schema } from "effect";
4
3
  import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
5
4
  import { ProviderNotFoundError, ServiceUnavailableError } from "../errors.js";
6
5
  export declare const ProviderGroup: HttpApiGroup.HttpApiGroup<"server.provider", HttpApiEndpoint.HttpApiEndpoint<"provider.list", "GET", "/api/provider", 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 settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
15
22
  readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
@@ -88,10 +95,18 @@ export declare const ProviderGroup: HttpApiGroup.HttpApiGroup<"server.provider",
88
95
  }>>, Schema.toCodecStringTree<Schema.Struct<{
89
96
  readonly location: Schema.optional<Schema.Struct<{
90
97
  readonly directory: Schema.optional<Schema.String>;
91
- readonly workspace: Schema.optional<Schema.String>;
92
98
  }>>;
93
99
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
94
- readonly location: typeof Location.Info;
100
+ readonly location: Schema.Struct<{
101
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
102
+ readonly project: Schema.Struct<{
103
+ readonly id: Schema.brand<Schema.String, "Project.ID"> & {
104
+ global: string & import("effect/Brand").Brand<"Project.ID">;
105
+ };
106
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
107
+ readonly canonical: Schema.brand<Schema.String, "AbsolutePath">;
108
+ }>;
109
+ }>;
95
110
  readonly data: Schema.Struct<{
96
111
  readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
97
112
  readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
@@ -1,4 +1,3 @@
1
- import { Location } from "@opencode/schema/location";
2
1
  import { Schema } from "effect";
3
2
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/unstable/httpapi";
4
3
  import { ForbiddenError, PtyNotFoundError } from "../errors.js";
@@ -9,10 +8,18 @@ export declare function hasPtyConnectTicketURL(url: URL): boolean;
9
8
  export declare const PtyGroup: HttpApiGroup.HttpApiGroup<"server.pty", HttpApiEndpoint.HttpApiEndpoint<"pty.list", "GET", "/api/pty", never, Schema.toCodecStringTree<Schema.Struct<{
10
9
  readonly location: Schema.optional<Schema.Struct<{
11
10
  readonly directory: Schema.optional<Schema.String>;
12
- readonly workspace: Schema.optional<Schema.String>;
13
11
  }>>;
14
12
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
15
- readonly location: typeof Location.Info;
13
+ readonly location: Schema.Struct<{
14
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
15
+ readonly project: Schema.Struct<{
16
+ readonly id: Schema.brand<Schema.String, "Project.ID"> & {
17
+ global: string & import("effect/Brand").Brand<"Project.ID">;
18
+ };
19
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
20
+ readonly canonical: Schema.brand<Schema.String, "AbsolutePath">;
21
+ }>;
22
+ }>;
16
23
  readonly data: Schema.$Array<Schema.Struct<{
17
24
  readonly id: Schema.brand<Schema.String, "PtyID"> & {
18
25
  create: () => string & import("effect/Brand").Brand<"PtyID">;
@@ -29,7 +36,6 @@ export declare const PtyGroup: HttpApiGroup.HttpApiGroup<"server.pty", HttpApiEn
29
36
  }>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"pty.create", "POST", "/api/pty", never, Schema.toCodecStringTree<Schema.Struct<{
30
37
  readonly location: Schema.optional<Schema.Struct<{
31
38
  readonly directory: Schema.optional<Schema.String>;
32
- readonly workspace: Schema.optional<Schema.String>;
33
39
  }>>;
34
40
  }>>, Schema.toCodecJson<Schema.Struct<{
35
41
  readonly command: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
@@ -38,7 +44,16 @@ export declare const PtyGroup: HttpApiGroup.HttpApiGroup<"server.pty", HttpApiEn
38
44
  readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
39
45
  readonly env: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
40
46
  }>>, never, Schema.toCodecJson<Schema.Struct<{
41
- readonly location: typeof Location.Info;
47
+ readonly location: Schema.Struct<{
48
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
49
+ readonly project: Schema.Struct<{
50
+ readonly id: Schema.brand<Schema.String, "Project.ID"> & {
51
+ global: string & import("effect/Brand").Brand<"Project.ID">;
52
+ };
53
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
54
+ readonly canonical: Schema.brand<Schema.String, "AbsolutePath">;
55
+ }>;
56
+ }>;
42
57
  readonly data: Schema.Struct<{
43
58
  readonly id: Schema.brand<Schema.String, "PtyID"> & {
44
59
  create: () => string & import("effect/Brand").Brand<"PtyID">;
@@ -60,10 +75,18 @@ export declare const PtyGroup: HttpApiGroup.HttpApiGroup<"server.pty", HttpApiEn
60
75
  }>>, Schema.toCodecStringTree<Schema.Struct<{
61
76
  readonly location: Schema.optional<Schema.Struct<{
62
77
  readonly directory: Schema.optional<Schema.String>;
63
- readonly workspace: Schema.optional<Schema.String>;
64
78
  }>>;
65
79
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
66
- readonly location: typeof Location.Info;
80
+ readonly location: Schema.Struct<{
81
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
82
+ readonly project: Schema.Struct<{
83
+ readonly id: Schema.brand<Schema.String, "Project.ID"> & {
84
+ global: string & import("effect/Brand").Brand<"Project.ID">;
85
+ };
86
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
87
+ readonly canonical: Schema.brand<Schema.String, "AbsolutePath">;
88
+ }>;
89
+ }>;
67
90
  readonly data: Schema.Struct<{
68
91
  readonly id: Schema.brand<Schema.String, "PtyID"> & {
69
92
  create: () => string & import("effect/Brand").Brand<"PtyID">;
@@ -85,7 +108,6 @@ export declare const PtyGroup: HttpApiGroup.HttpApiGroup<"server.pty", HttpApiEn
85
108
  }>>, Schema.toCodecStringTree<Schema.Struct<{
86
109
  readonly location: Schema.optional<Schema.Struct<{
87
110
  readonly directory: Schema.optional<Schema.String>;
88
- readonly workspace: Schema.optional<Schema.String>;
89
111
  }>>;
90
112
  }>>, Schema.toCodecJson<Schema.Struct<{
91
113
  readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
@@ -97,7 +119,16 @@ export declare const PtyGroup: HttpApiGroup.HttpApiGroup<"server.pty", HttpApiEn
97
119
  readonly cols: Schema.Int;
98
120
  }>>, never, never>;
99
121
  }>>, never, Schema.toCodecJson<Schema.Struct<{
100
- readonly location: typeof Location.Info;
122
+ readonly location: Schema.Struct<{
123
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
124
+ readonly project: Schema.Struct<{
125
+ readonly id: Schema.brand<Schema.String, "Project.ID"> & {
126
+ global: string & import("effect/Brand").Brand<"Project.ID">;
127
+ };
128
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
129
+ readonly canonical: Schema.brand<Schema.String, "AbsolutePath">;
130
+ }>;
131
+ }>;
101
132
  readonly data: Schema.Struct<{
102
133
  readonly id: Schema.brand<Schema.String, "PtyID"> & {
103
134
  create: () => string & import("effect/Brand").Brand<"PtyID">;
@@ -119,7 +150,6 @@ export declare const PtyGroup: HttpApiGroup.HttpApiGroup<"server.pty", HttpApiEn
119
150
  }>>, Schema.toCodecStringTree<Schema.Struct<{
120
151
  readonly location: Schema.optional<Schema.Struct<{
121
152
  readonly directory: Schema.optional<Schema.String>;
122
- readonly workspace: Schema.optional<Schema.String>;
123
153
  }>>;
124
154
  }>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof PtyNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"pty.connectToken", "POST", "/api/pty/:ptyID/connect-token", Schema.toCodecStringTree<Schema.Struct<{
125
155
  ptyID: Schema.brand<Schema.String, "PtyID"> & {
@@ -129,12 +159,20 @@ export declare const PtyGroup: HttpApiGroup.HttpApiGroup<"server.pty", HttpApiEn
129
159
  }>>, Schema.toCodecStringTree<Schema.Struct<{
130
160
  readonly location: Schema.optional<Schema.Struct<{
131
161
  readonly directory: Schema.optional<Schema.String>;
132
- readonly workspace: Schema.optional<Schema.String>;
133
162
  }>>;
134
163
  }>>, never, Schema.toCodecStringTree<Schema.Struct<{
135
164
  readonly "x-opencode-ticket": Schema.optional<Schema.String>;
136
165
  }>>, Schema.toCodecJson<Schema.Struct<{
137
- readonly location: typeof Location.Info;
166
+ readonly location: Schema.Struct<{
167
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
168
+ readonly project: Schema.Struct<{
169
+ readonly id: Schema.brand<Schema.String, "Project.ID"> & {
170
+ global: string & import("effect/Brand").Brand<"Project.ID">;
171
+ };
172
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
173
+ readonly canonical: Schema.brand<Schema.String, "AbsolutePath">;
174
+ }>;
175
+ }>;
138
176
  readonly data: Schema.Struct<{
139
177
  readonly ticket: Schema.String;
140
178
  readonly expires_in: Schema.Int;
@@ -102,7 +102,7 @@ HttpApiEndpoint.get("pty.connect", "/api/pty/:ptyID/connect", {
102
102
  "x-websocket": true,
103
103
  parameters: [
104
104
  ...(operation.parameters ?? []),
105
- ...["location[directory]", "location[workspace]", "cursor", PTY_CONNECT_TICKET_QUERY].map((name) => ({
105
+ ...["location[directory]", "cursor", PTY_CONNECT_TICKET_QUERY].map((name) => ({
106
106
  in: "query",
107
107
  name,
108
108
  schema: { type: "string" },
@@ -1,13 +1,20 @@
1
- import { Location } from "@opencode/schema/location";
2
1
  import { Schema } from "effect";
3
2
  import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
4
3
  export declare const ReferenceGroup: HttpApiGroup.HttpApiGroup<"server.reference", HttpApiEndpoint.HttpApiEndpoint<"reference.list", "GET", "/api/reference", never, Schema.toCodecStringTree<Schema.Struct<{
5
4
  readonly location: Schema.optional<Schema.Struct<{
6
5
  readonly directory: Schema.optional<Schema.String>;
7
- readonly workspace: Schema.optional<Schema.String>;
8
6
  }>>;
9
7
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
10
- readonly location: typeof Location.Info;
8
+ readonly location: Schema.Struct<{
9
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
10
+ readonly project: Schema.Struct<{
11
+ readonly id: Schema.brand<Schema.String, "Project.ID"> & {
12
+ global: string & import("effect/Brand").Brand<"Project.ID">;
13
+ };
14
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
15
+ readonly canonical: Schema.brand<Schema.String, "AbsolutePath">;
16
+ }>;
17
+ }>;
11
18
  readonly data: Schema.$Array<Schema.Struct<{
12
19
  readonly name: Schema.String;
13
20
  readonly path: Schema.brand<Schema.String, "AbsolutePath">;
@@ -13,7 +13,6 @@ export declare const RpcGroup: HttpApiGroup.HttpApiGroup<"server.rpc", HttpApiEn
13
13
  }>>, Schema.toCodecStringTree<Schema.Struct<{
14
14
  readonly location: Schema.optional<Schema.Struct<{
15
15
  readonly directory: Schema.optional<Schema.String>;
16
- readonly workspace: Schema.optional<Schema.String>;
17
16
  }>>;
18
17
  }>>, Schema.toCodecJson<Schema.Struct<{
19
18
  readonly input: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Unknown>>, Schema.optionalKey<Schema.Unknown>, never, never>;