@opencode/protocol 0.0.0-dev-21314 → 0.0.0-dev-21317
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/pty.d.ts +36 -36
- package/package.json +2 -2
package/dist/groups/pty.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ 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.
|
|
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
10
|
ptyID: Schema.brand<Schema.String, "PtyID"> & {
|
|
11
11
|
create: () => string & import("effect/Brand").Brand<"PtyID">;
|
|
12
12
|
ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
|
|
@@ -15,15 +15,31 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
|
|
|
15
15
|
readonly location: Schema.optional<Schema.Struct<{
|
|
16
16
|
readonly directory: Schema.optional<Schema.String>;
|
|
17
17
|
}>>;
|
|
18
|
-
}>>, never,
|
|
18
|
+
}>>, never, Schema.toCodecStringTree<Schema.Struct<{
|
|
19
|
+
readonly "x-opencode-ticket": Schema.optional<Schema.String>;
|
|
20
|
+
}>>, Schema.toCodecJson<Schema.Struct<{
|
|
21
|
+
readonly location: Schema.Struct<{
|
|
22
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
23
|
+
}>;
|
|
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<{
|
|
19
29
|
readonly location: Schema.optional<Schema.Struct<{
|
|
20
30
|
readonly directory: Schema.optional<Schema.String>;
|
|
21
31
|
}>>;
|
|
22
|
-
}>>,
|
|
32
|
+
}>>, Schema.toCodecJson<Schema.Struct<{
|
|
33
|
+
readonly command: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
34
|
+
readonly args: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
|
|
35
|
+
readonly cwd: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
36
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
37
|
+
readonly env: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
38
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
23
39
|
readonly location: Schema.Struct<{
|
|
24
40
|
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
25
41
|
}>;
|
|
26
|
-
readonly data: Schema
|
|
42
|
+
readonly data: Schema.Struct<{
|
|
27
43
|
readonly id: Schema.brand<Schema.String, "PtyID"> & {
|
|
28
44
|
create: () => string & import("effect/Brand").Brand<"PtyID">;
|
|
29
45
|
ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
|
|
@@ -35,7 +51,7 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
|
|
|
35
51
|
readonly status: Schema.Literals<readonly ["running", "exited"]>;
|
|
36
52
|
readonly pid: Schema.Int;
|
|
37
53
|
readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
38
|
-
}
|
|
54
|
+
}>;
|
|
39
55
|
}>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.get", "GET", "/api/pty/:ptyID", Schema.toCodecStringTree<Schema.Struct<{
|
|
40
56
|
ptyID: Schema.brand<Schema.String, "PtyID"> & {
|
|
41
57
|
create: () => string & import("effect/Brand").Brand<"PtyID">;
|
|
@@ -62,21 +78,15 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
|
|
|
62
78
|
readonly pid: Schema.Int;
|
|
63
79
|
readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
64
80
|
}>;
|
|
65
|
-
}>>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.
|
|
81
|
+
}>>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.list", "GET", "/api/pty", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
66
82
|
readonly location: Schema.optional<Schema.Struct<{
|
|
67
83
|
readonly directory: Schema.optional<Schema.String>;
|
|
68
84
|
}>>;
|
|
69
|
-
}>>, Schema.toCodecJson<Schema.Struct<{
|
|
70
|
-
readonly command: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
71
|
-
readonly args: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
|
|
72
|
-
readonly cwd: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
73
|
-
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
74
|
-
readonly env: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
75
|
-
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
85
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
76
86
|
readonly location: Schema.Struct<{
|
|
77
87
|
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
78
88
|
}>;
|
|
79
|
-
readonly data: Schema.Struct<{
|
|
89
|
+
readonly data: Schema.$Array<Schema.Struct<{
|
|
80
90
|
readonly id: Schema.brand<Schema.String, "PtyID"> & {
|
|
81
91
|
create: () => string & import("effect/Brand").Brand<"PtyID">;
|
|
82
92
|
ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
|
|
@@ -88,8 +98,17 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
|
|
|
88
98
|
readonly status: Schema.Literals<readonly ["running", "exited"]>;
|
|
89
99
|
readonly pid: Schema.Int;
|
|
90
100
|
readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
91
|
-
}
|
|
92
|
-
}>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.
|
|
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<{
|
|
93
112
|
ptyID: Schema.brand<Schema.String, "PtyID"> & {
|
|
94
113
|
create: () => string & import("effect/Brand").Brand<"PtyID">;
|
|
95
114
|
ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
|
|
@@ -124,26 +143,7 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
|
|
|
124
143
|
readonly pid: Schema.Int;
|
|
125
144
|
readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
126
145
|
}>;
|
|
127
|
-
}>>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.
|
|
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<{
|
|
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-
|
|
4
|
+
"version": "0.0.0-dev-21317",
|
|
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-
|
|
36
|
+
"@opencode/schema": "0.0.0-dev-21317",
|
|
37
37
|
"effect": "4.0.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|