@opencode/protocol 0.0.0-dev-21112 → 0.0.0-dev-21116

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,26 +6,28 @@ 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.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<{
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<{
15
10
  readonly location: Schema.optional<Schema.Struct<{
16
11
  readonly directory: Schema.optional<Schema.String>;
17
12
  }>>;
18
- }>>, never, Schema.toCodecStringTree<Schema.Struct<{
19
- readonly "x-opencode-ticket": Schema.optional<Schema.String>;
20
- }>>, Schema.toCodecJson<Schema.Struct<{
13
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
21
14
  readonly location: Schema.Struct<{
22
15
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
23
16
  }>;
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<{
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<{
29
31
  readonly location: Schema.optional<Schema.Struct<{
30
32
  readonly directory: Schema.optional<Schema.String>;
31
33
  }>>;
@@ -52,7 +54,7 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
52
54
  readonly pid: Schema.Int;
53
55
  readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
54
56
  }>;
55
- }>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.get", "GET", "/api/pty/:ptyID", Schema.toCodecStringTree<Schema.Struct<{
57
+ }>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.remove", "DELETE", "/api/pty/:ptyID", Schema.toCodecStringTree<Schema.Struct<{
56
58
  ptyID: Schema.brand<Schema.String, "PtyID"> & {
57
59
  create: () => string & import("effect/Brand").Brand<"PtyID">;
58
60
  ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
@@ -61,24 +63,12 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
61
63
  readonly location: Schema.optional<Schema.Struct<{
62
64
  readonly directory: Schema.optional<Schema.String>;
63
65
  }>>;
64
- }>>, never, never, Schema.toCodecJson<Schema.Struct<{
65
- readonly location: Schema.Struct<{
66
- readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
67
- }>;
68
- readonly data: Schema.Struct<{
69
- readonly id: Schema.brand<Schema.String, "PtyID"> & {
70
- create: () => string & import("effect/Brand").Brand<"PtyID">;
71
- ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
72
- };
73
- readonly title: Schema.String;
74
- readonly command: Schema.String;
75
- readonly args: Schema.$Array<Schema.String>;
76
- readonly cwd: Schema.String;
77
- readonly status: Schema.Literals<readonly ["running", "exited"]>;
78
- readonly pid: Schema.Int;
79
- readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
80
- }>;
81
- }>>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.list", "GET", "/api/pty", never, Schema.toCodecStringTree<Schema.Struct<{
66
+ }>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.get", "GET", "/api/pty/:ptyID", Schema.toCodecStringTree<Schema.Struct<{
67
+ ptyID: Schema.brand<Schema.String, "PtyID"> & {
68
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
69
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
70
+ };
71
+ }>>, Schema.toCodecStringTree<Schema.Struct<{
82
72
  readonly location: Schema.optional<Schema.Struct<{
83
73
  readonly directory: Schema.optional<Schema.String>;
84
74
  }>>;
@@ -86,7 +76,7 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
86
76
  readonly location: Schema.Struct<{
87
77
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
88
78
  }>;
89
- readonly data: Schema.$Array<Schema.Struct<{
79
+ readonly data: Schema.Struct<{
90
80
  readonly id: Schema.brand<Schema.String, "PtyID"> & {
91
81
  create: () => string & import("effect/Brand").Brand<"PtyID">;
92
82
  ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
@@ -98,17 +88,8 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
98
88
  readonly status: Schema.Literals<readonly ["running", "exited"]>;
99
89
  readonly pid: Schema.Int;
100
90
  readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
101
- }>>;
102
- }>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.remove", "DELETE", "/api/pty/:ptyID", Schema.toCodecStringTree<Schema.Struct<{
103
- ptyID: Schema.brand<Schema.String, "PtyID"> & {
104
- create: () => string & import("effect/Brand").Brand<"PtyID">;
105
- ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
106
- };
107
- }>>, Schema.toCodecStringTree<Schema.Struct<{
108
- readonly location: Schema.optional<Schema.Struct<{
109
- readonly directory: Schema.optional<Schema.String>;
110
- }>>;
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<{
91
+ }>;
92
+ }>>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.update", "PUT", "/api/pty/:ptyID", Schema.toCodecStringTree<Schema.Struct<{
112
93
  ptyID: Schema.brand<Schema.String, "PtyID"> & {
113
94
  create: () => string & import("effect/Brand").Brand<"PtyID">;
114
95
  ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
@@ -143,7 +124,26 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
143
124
  readonly pid: Schema.Int;
144
125
  readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
145
126
  }>;
146
- }>>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.connect", "GET", "/api/pty/:ptyID/connect", Schema.toCodecStringTree<Schema.Struct<{
127
+ }>>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.connectToken", "POST", "/api/pty/:ptyID/connect-token", Schema.toCodecStringTree<Schema.Struct<{
128
+ ptyID: Schema.brand<Schema.String, "PtyID"> & {
129
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
130
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
131
+ };
132
+ }>>, Schema.toCodecStringTree<Schema.Struct<{
133
+ readonly location: Schema.optional<Schema.Struct<{
134
+ readonly directory: Schema.optional<Schema.String>;
135
+ }>>;
136
+ }>>, never, Schema.toCodecStringTree<Schema.Struct<{
137
+ readonly "x-opencode-ticket": Schema.optional<Schema.String>;
138
+ }>>, Schema.toCodecJson<Schema.Struct<{
139
+ readonly location: Schema.Struct<{
140
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
141
+ }>;
142
+ readonly data: Schema.Struct<{
143
+ readonly ticket: Schema.String;
144
+ readonly expires_in: Schema.Int;
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<{
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-21112",
4
+ "version": "0.0.0-dev-21116",
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-21112",
36
+ "@opencode/schema": "0.0.0-dev-21116",
37
37
  "effect": "4.0.1"
38
38
  },
39
39
  "devDependencies": {