@opencode/protocol 0.0.0-dev-21132 → 0.0.0-dev-21134
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/permission.d.ts +6 -6
- package/dist/groups/pty.d.ts +41 -41
- package/package.json +2 -2
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { Context, Schema } from "effect";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema } from "effect/http-api";
|
|
3
3
|
import { LocationNotFoundError, PermissionNotFoundError, SessionNotFoundError } from "../errors.js";
|
|
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.
|
|
5
|
-
id: Schema.brand<Schema.String, "PermissionSaved.ID"> & {
|
|
6
|
-
create: () => string & import("effect/Brand").Brand<"PermissionSaved.ID">;
|
|
7
|
-
};
|
|
8
|
-
}>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"permission.request.list", "GET", "/api/permission/request", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
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<{
|
|
9
5
|
readonly location: Schema.optional<Schema.Struct<{
|
|
10
6
|
readonly directory: Schema.optional<Schema.String>;
|
|
11
7
|
}>>;
|
|
@@ -55,7 +51,11 @@ export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.
|
|
|
55
51
|
readonly updated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
56
52
|
}>;
|
|
57
53
|
}>>;
|
|
58
|
-
}>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
54
|
+
}>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"permission.saved.remove", "DELETE", "/api/permission/saved/:id", Schema.toCodecStringTree<Schema.Struct<{
|
|
55
|
+
id: Schema.brand<Schema.String, "PermissionSaved.ID"> & {
|
|
56
|
+
create: () => string & import("effect/Brand").Brand<"PermissionSaved.ID">;
|
|
57
|
+
};
|
|
58
|
+
}>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"session.permission.create", "POST", "/api/session/:sessionID/permission", Schema.toCodecStringTree<Schema.Struct<{
|
|
59
59
|
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
60
60
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
61
61
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
package/dist/groups/pty.d.ts
CHANGED
|
@@ -6,16 +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.
|
|
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<{
|
|
15
|
-
readonly location: Schema.optional<Schema.Struct<{
|
|
16
|
-
readonly directory: Schema.optional<Schema.String>;
|
|
17
|
-
}>>;
|
|
18
|
-
}>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | 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.list", "GET", "/api/pty", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
19
10
|
readonly location: Schema.optional<Schema.Struct<{
|
|
20
11
|
readonly directory: Schema.optional<Schema.String>;
|
|
21
12
|
}>>;
|
|
@@ -36,16 +27,17 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
|
|
|
36
27
|
readonly pid: Schema.Int;
|
|
37
28
|
readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
38
29
|
}>>;
|
|
39
|
-
}>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.
|
|
40
|
-
ptyID: Schema.brand<Schema.String, "PtyID"> & {
|
|
41
|
-
create: () => string & import("effect/Brand").Brand<"PtyID">;
|
|
42
|
-
ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
|
|
43
|
-
};
|
|
44
|
-
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
30
|
+
}>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.create", "POST", "/api/pty", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
45
31
|
readonly location: Schema.optional<Schema.Struct<{
|
|
46
32
|
readonly directory: Schema.optional<Schema.String>;
|
|
47
33
|
}>>;
|
|
48
|
-
}>>,
|
|
34
|
+
}>>, Schema.toCodecJson<Schema.Struct<{
|
|
35
|
+
readonly command: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
36
|
+
readonly args: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
|
|
37
|
+
readonly cwd: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
38
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
39
|
+
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
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
49
41
|
readonly location: Schema.Struct<{
|
|
50
42
|
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
51
43
|
}>;
|
|
@@ -62,7 +54,7 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
|
|
|
62
54
|
readonly pid: Schema.Int;
|
|
63
55
|
readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
64
56
|
}>;
|
|
65
|
-
}>>,
|
|
57
|
+
}>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.get", "GET", "/api/pty/:ptyID", Schema.toCodecStringTree<Schema.Struct<{
|
|
66
58
|
ptyID: Schema.brand<Schema.String, "PtyID"> & {
|
|
67
59
|
create: () => string & import("effect/Brand").Brand<"PtyID">;
|
|
68
60
|
ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
|
|
@@ -71,27 +63,7 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
|
|
|
71
63
|
readonly location: Schema.optional<Schema.Struct<{
|
|
72
64
|
readonly directory: Schema.optional<Schema.String>;
|
|
73
65
|
}>>;
|
|
74
|
-
}>>, never, Schema.
|
|
75
|
-
readonly "x-opencode-ticket": Schema.optional<Schema.String>;
|
|
76
|
-
}>>, Schema.toCodecJson<Schema.Struct<{
|
|
77
|
-
readonly location: Schema.Struct<{
|
|
78
|
-
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
79
|
-
}>;
|
|
80
|
-
readonly data: Schema.Struct<{
|
|
81
|
-
readonly ticket: Schema.String;
|
|
82
|
-
readonly expires_in: Schema.Int;
|
|
83
|
-
}>;
|
|
84
|
-
}>>, Schema.toCodecJson<typeof ForbiddenError | typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.create", "POST", "/api/pty", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
85
|
-
readonly location: Schema.optional<Schema.Struct<{
|
|
86
|
-
readonly directory: Schema.optional<Schema.String>;
|
|
87
|
-
}>>;
|
|
88
|
-
}>>, Schema.toCodecJson<Schema.Struct<{
|
|
89
|
-
readonly command: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
90
|
-
readonly args: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
|
|
91
|
-
readonly cwd: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
92
|
-
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
93
|
-
readonly env: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
94
|
-
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
66
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
95
67
|
readonly location: Schema.Struct<{
|
|
96
68
|
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
97
69
|
}>;
|
|
@@ -108,7 +80,7 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
|
|
|
108
80
|
readonly pid: Schema.Int;
|
|
109
81
|
readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
110
82
|
}>;
|
|
111
|
-
}>>,
|
|
83
|
+
}>>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.update", "PUT", "/api/pty/:ptyID", Schema.toCodecStringTree<Schema.Struct<{
|
|
112
84
|
ptyID: Schema.brand<Schema.String, "PtyID"> & {
|
|
113
85
|
create: () => string & import("effect/Brand").Brand<"PtyID">;
|
|
114
86
|
ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
|
|
@@ -143,7 +115,35 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
|
|
|
143
115
|
readonly pid: Schema.Int;
|
|
144
116
|
readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
145
117
|
}>;
|
|
146
|
-
}>>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.
|
|
118
|
+
}>>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.remove", "DELETE", "/api/pty/:ptyID", Schema.toCodecStringTree<Schema.Struct<{
|
|
119
|
+
ptyID: Schema.brand<Schema.String, "PtyID"> & {
|
|
120
|
+
create: () => string & import("effect/Brand").Brand<"PtyID">;
|
|
121
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
|
|
122
|
+
};
|
|
123
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
124
|
+
readonly location: Schema.optional<Schema.Struct<{
|
|
125
|
+
readonly directory: Schema.optional<Schema.String>;
|
|
126
|
+
}>>;
|
|
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<{
|
|
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-
|
|
4
|
+
"version": "0.0.0-dev-21134",
|
|
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-21134",
|
|
37
37
|
"effect": "4.0.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|