@opencode/protocol 0.0.0-dev-21146 → 0.0.0-dev-21156

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.
@@ -6,28 +6,26 @@ export declare const PTY_CONNECT_TOKEN_HEADER = "x-opencode-ticket";
6
6
  export declare const PTY_CONNECT_TOKEN_HEADER_VALUE = "1";
7
7
  export declare const PTY_CONNECT_PATH = "/api/pty/:ptyID/connect";
8
8
  export declare function hasPtyConnectTicketURL(url: URL): boolean;
9
- export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId, LocationService>(locationMiddleware: Context.Key<LocationId, LocationService>) => HttpApiGroup.HttpApiGroup<"server.pty", HttpApiEndpoint.HttpApiEndpoint<"pty.list", "GET", "/api/pty", never, Schema.toCodecStringTree<Schema.Struct<{
9
+ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId, LocationService>(locationMiddleware: Context.Key<LocationId, LocationService>) => HttpApiGroup.HttpApiGroup<"server.pty", HttpApiEndpoint.HttpApiEndpoint<"pty.connectToken", "POST", "/api/pty/:ptyID/connect-token", Schema.toCodecStringTree<Schema.Struct<{
10
+ ptyID: Schema.brand<Schema.String, "PtyID"> & {
11
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
12
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
13
+ };
14
+ }>>, Schema.toCodecStringTree<Schema.Struct<{
10
15
  readonly location: Schema.optional<Schema.Struct<{
11
16
  readonly directory: Schema.optional<Schema.String>;
12
17
  }>>;
13
- }>>, never, never, Schema.toCodecJson<Schema.Struct<{
18
+ }>>, never, Schema.toCodecStringTree<Schema.Struct<{
19
+ readonly "x-opencode-ticket": Schema.optional<Schema.String>;
20
+ }>>, Schema.toCodecJson<Schema.Struct<{
14
21
  readonly location: Schema.Struct<{
15
22
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
16
23
  }>;
17
- readonly data: Schema.$Array<Schema.Struct<{
18
- readonly id: Schema.brand<Schema.String, "PtyID"> & {
19
- create: () => string & import("effect/Brand").Brand<"PtyID">;
20
- ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
21
- };
22
- readonly title: Schema.String;
23
- readonly command: Schema.String;
24
- readonly args: Schema.$Array<Schema.String>;
25
- readonly cwd: Schema.String;
26
- readonly status: Schema.Literals<readonly ["running", "exited"]>;
27
- readonly pid: Schema.Int;
28
- readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
29
- }>>;
30
- }>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.create", "POST", "/api/pty", never, Schema.toCodecStringTree<Schema.Struct<{
24
+ readonly data: Schema.Struct<{
25
+ readonly ticket: Schema.String;
26
+ readonly expires_in: Schema.Int;
27
+ }>;
28
+ }>>, Schema.toCodecJson<typeof ForbiddenError | typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.create", "POST", "/api/pty", never, Schema.toCodecStringTree<Schema.Struct<{
31
29
  readonly location: Schema.optional<Schema.Struct<{
32
30
  readonly directory: Schema.optional<Schema.String>;
33
31
  }>>;
@@ -80,29 +78,15 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
80
78
  readonly pid: Schema.Int;
81
79
  readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
82
80
  }>;
83
- }>>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.update", "PUT", "/api/pty/:ptyID", Schema.toCodecStringTree<Schema.Struct<{
84
- ptyID: Schema.brand<Schema.String, "PtyID"> & {
85
- create: () => string & import("effect/Brand").Brand<"PtyID">;
86
- ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
87
- };
88
- }>>, Schema.toCodecStringTree<Schema.Struct<{
81
+ }>>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.list", "GET", "/api/pty", never, Schema.toCodecStringTree<Schema.Struct<{
89
82
  readonly location: Schema.optional<Schema.Struct<{
90
83
  readonly directory: Schema.optional<Schema.String>;
91
84
  }>>;
92
- }>>, Schema.toCodecJson<Schema.Struct<{
93
- readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
94
- readonly size: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
95
- readonly rows: Schema.Int;
96
- readonly cols: Schema.Int;
97
- }>>>, Schema.optionalKey<Schema.Struct<{
98
- readonly rows: Schema.Int;
99
- readonly cols: Schema.Int;
100
- }>>, never, never>;
101
- }>>, never, Schema.toCodecJson<Schema.Struct<{
85
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
102
86
  readonly location: Schema.Struct<{
103
87
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
104
88
  }>;
105
- readonly data: Schema.Struct<{
89
+ readonly data: Schema.$Array<Schema.Struct<{
106
90
  readonly id: Schema.brand<Schema.String, "PtyID"> & {
107
91
  create: () => string & import("effect/Brand").Brand<"PtyID">;
108
92
  ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
@@ -114,8 +98,8 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
114
98
  readonly status: Schema.Literals<readonly ["running", "exited"]>;
115
99
  readonly pid: Schema.Int;
116
100
  readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
117
- }>;
118
- }>>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.remove", "DELETE", "/api/pty/:ptyID", Schema.toCodecStringTree<Schema.Struct<{
101
+ }>>;
102
+ }>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.remove", "DELETE", "/api/pty/:ptyID", Schema.toCodecStringTree<Schema.Struct<{
119
103
  ptyID: Schema.brand<Schema.String, "PtyID"> & {
120
104
  create: () => string & import("effect/Brand").Brand<"PtyID">;
121
105
  ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
@@ -124,7 +108,7 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
124
108
  readonly location: Schema.optional<Schema.Struct<{
125
109
  readonly directory: Schema.optional<Schema.String>;
126
110
  }>>;
127
- }>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.connectToken", "POST", "/api/pty/:ptyID/connect-token", Schema.toCodecStringTree<Schema.Struct<{
111
+ }>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.update", "PUT", "/api/pty/:ptyID", Schema.toCodecStringTree<Schema.Struct<{
128
112
  ptyID: Schema.brand<Schema.String, "PtyID"> & {
129
113
  create: () => string & import("effect/Brand").Brand<"PtyID">;
130
114
  ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
@@ -133,17 +117,33 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
133
117
  readonly location: Schema.optional<Schema.Struct<{
134
118
  readonly directory: Schema.optional<Schema.String>;
135
119
  }>>;
136
- }>>, never, Schema.toCodecStringTree<Schema.Struct<{
137
- readonly "x-opencode-ticket": Schema.optional<Schema.String>;
138
120
  }>>, Schema.toCodecJson<Schema.Struct<{
121
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
122
+ readonly size: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
123
+ readonly rows: Schema.Int;
124
+ readonly cols: Schema.Int;
125
+ }>>>, Schema.optionalKey<Schema.Struct<{
126
+ readonly rows: Schema.Int;
127
+ readonly cols: Schema.Int;
128
+ }>>, never, never>;
129
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
139
130
  readonly location: Schema.Struct<{
140
131
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
141
132
  }>;
142
133
  readonly data: Schema.Struct<{
143
- readonly ticket: Schema.String;
144
- readonly expires_in: Schema.Int;
134
+ readonly id: Schema.brand<Schema.String, "PtyID"> & {
135
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
136
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
137
+ };
138
+ readonly title: Schema.String;
139
+ readonly command: Schema.String;
140
+ readonly args: Schema.$Array<Schema.String>;
141
+ readonly cwd: Schema.String;
142
+ readonly status: Schema.Literals<readonly ["running", "exited"]>;
143
+ readonly pid: Schema.Int;
144
+ readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
145
145
  }>;
146
- }>>, Schema.toCodecJson<typeof ForbiddenError | typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.connect", "GET", "/api/pty/:ptyID/connect", Schema.toCodecStringTree<Schema.Struct<{
146
+ }>>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.connect", "GET", "/api/pty/:ptyID/connect", Schema.toCodecStringTree<Schema.Struct<{
147
147
  ptyID: Schema.brand<Schema.String, "PtyID"> & {
148
148
  create: () => string & import("effect/Brand").Brand<"PtyID">;
149
149
  ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
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-21146",
4
+ "version": "0.0.0-dev-21156",
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-21146",
36
+ "@opencode/schema": "0.0.0-dev-21156",
37
37
  "effect": "4.0.1"
38
38
  },
39
39
  "devDependencies": {