@opencode/protocol 2.1.2 → 2.1.4
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/api.d.ts +4 -3
- package/dist/api.js +2 -2
- package/dist/client.js +8 -2
- package/dist/groups/debug.d.ts +14 -1
- package/dist/groups/debug.js +26 -0
- package/dist/groups/event.d.ts +1220 -1465
- package/dist/groups/mcp.d.ts +48 -25
- package/dist/groups/mcp.js +40 -4
- package/dist/groups/message.d.ts +26 -27
- package/dist/groups/permission.d.ts +28 -35
- package/dist/groups/persistent-pty.d.ts +0 -8
- package/dist/groups/pty.d.ts +24 -24
- package/dist/groups/session.d.ts +306 -532
- package/dist/groups/voice.d.ts +35 -2
- package/dist/groups/voice.js +40 -2
- package/package.json +6 -5
package/dist/groups/mcp.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Mcp } from "@opencode/schema/mcp";
|
|
2
|
-
import { Schema } from "effect";
|
|
3
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/http-api";
|
|
4
|
-
import { McpServerNotFoundError } from "../errors.js";
|
|
5
|
-
export declare const
|
|
2
|
+
import { Context, Schema } from "effect";
|
|
3
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema } from "effect/http-api";
|
|
4
|
+
import { ForbiddenError, LocationNotFoundError, McpServerNotFoundError } from "../errors.js";
|
|
5
|
+
export declare const MCP_CLIENT_PATH = "/api/experimental/client-mcp";
|
|
6
|
+
export declare function hasMcpClientTicketURL(url: URL): boolean;
|
|
7
|
+
export declare const makeMcpGroup: <LocationId extends HttpApiMiddleware.AnyId, LocationService>(locationMiddleware: Context.Key<LocationId, LocationService>) => HttpApiGroup.HttpApiGroup<"server.mcp", HttpApiEndpoint.HttpApiEndpoint<"mcp.add", "PUT", "/api/experimental/mcp/:server", Schema.toCodecStringTree<Schema.Struct<{
|
|
6
8
|
server: Schema.String;
|
|
7
9
|
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
8
10
|
readonly location: Schema.optional<Schema.Struct<{
|
|
@@ -10,19 +12,7 @@ export declare const McpGroup: HttpApiGroup.HttpApiGroup<"server.mcp", HttpApiEn
|
|
|
10
12
|
}>>;
|
|
11
13
|
}>>, Schema.toCodecJson<Schema.Struct<{
|
|
12
14
|
readonly config: Schema.toTaggedUnion<"type", readonly [typeof Mcp.LocalConfig, typeof Mcp.RemoteConfig]>;
|
|
13
|
-
}>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never,
|
|
14
|
-
server: Schema.String;
|
|
15
|
-
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
16
|
-
readonly location: Schema.optional<Schema.Struct<{
|
|
17
|
-
readonly directory: Schema.optional<Schema.String>;
|
|
18
|
-
}>>;
|
|
19
|
-
}>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof McpServerNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"mcp.disconnect", "POST", "/api/experimental/mcp/:server/disconnect", Schema.toCodecStringTree<Schema.Struct<{
|
|
20
|
-
server: Schema.String;
|
|
21
|
-
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
22
|
-
readonly location: Schema.optional<Schema.Struct<{
|
|
23
|
-
readonly directory: Schema.optional<Schema.String>;
|
|
24
|
-
}>>;
|
|
25
|
-
}>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof McpServerNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"mcp.list", "GET", "/api/mcp", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
15
|
+
}>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"mcp.list", "GET", "/api/mcp", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
26
16
|
readonly location: Schema.optional<Schema.Struct<{
|
|
27
17
|
readonly directory: Schema.optional<Schema.String>;
|
|
28
18
|
}>>;
|
|
@@ -47,13 +37,7 @@ export declare const McpGroup: HttpApiGroup.HttpApiGroup<"server.mcp", HttpApiEn
|
|
|
47
37
|
}>]>;
|
|
48
38
|
readonly integrationID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Integration.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Integration.ID">>, never, never>;
|
|
49
39
|
}>>;
|
|
50
|
-
}>>, never,
|
|
51
|
-
server: Schema.String;
|
|
52
|
-
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
53
|
-
readonly location: Schema.optional<Schema.Struct<{
|
|
54
|
-
readonly directory: Schema.optional<Schema.String>;
|
|
55
|
-
}>>;
|
|
56
|
-
}>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof McpServerNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"mcp.resource.catalog", "GET", "/api/mcp/resource", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
40
|
+
}>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"mcp.resource.catalog", "GET", "/api/mcp/resource", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
57
41
|
readonly location: Schema.optional<Schema.Struct<{
|
|
58
42
|
readonly directory: Schema.optional<Schema.String>;
|
|
59
43
|
}>>;
|
|
@@ -77,4 +61,43 @@ export declare const McpGroup: HttpApiGroup.HttpApiGroup<"server.mcp", HttpApiEn
|
|
|
77
61
|
readonly mimeType: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
78
62
|
}>>;
|
|
79
63
|
}>;
|
|
80
|
-
}>>, never,
|
|
64
|
+
}>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"mcp.connect", "POST", "/api/experimental/mcp/:server/connect", Schema.toCodecStringTree<Schema.Struct<{
|
|
65
|
+
server: Schema.String;
|
|
66
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
67
|
+
readonly location: Schema.optional<Schema.Struct<{
|
|
68
|
+
readonly directory: Schema.optional<Schema.String>;
|
|
69
|
+
}>>;
|
|
70
|
+
}>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof McpServerNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"mcp.disconnect", "POST", "/api/experimental/mcp/:server/disconnect", Schema.toCodecStringTree<Schema.Struct<{
|
|
71
|
+
server: Schema.String;
|
|
72
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
73
|
+
readonly location: Schema.optional<Schema.Struct<{
|
|
74
|
+
readonly directory: Schema.optional<Schema.String>;
|
|
75
|
+
}>>;
|
|
76
|
+
}>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof McpServerNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"mcp.remove", "DELETE", "/api/experimental/mcp/:server", Schema.toCodecStringTree<Schema.Struct<{
|
|
77
|
+
server: Schema.String;
|
|
78
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
79
|
+
readonly location: Schema.optional<Schema.Struct<{
|
|
80
|
+
readonly directory: Schema.optional<Schema.String>;
|
|
81
|
+
}>>;
|
|
82
|
+
}>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof McpServerNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"mcp.clientToken", "POST", "/api/experimental/client-mcp/token", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
83
|
+
readonly location: Schema.optional<Schema.Struct<{
|
|
84
|
+
readonly directory: Schema.optional<Schema.String>;
|
|
85
|
+
}>>;
|
|
86
|
+
readonly name: Schema.String;
|
|
87
|
+
}>>, never, Schema.toCodecStringTree<Schema.Struct<{
|
|
88
|
+
readonly "x-opencode-ticket": Schema.optional<Schema.String>;
|
|
89
|
+
}>>, Schema.toCodecJson<Schema.Struct<{
|
|
90
|
+
readonly location: Schema.Struct<{
|
|
91
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
92
|
+
}>;
|
|
93
|
+
readonly data: Schema.Struct<{
|
|
94
|
+
readonly ticket: Schema.String;
|
|
95
|
+
readonly expires_in: Schema.Int;
|
|
96
|
+
}>;
|
|
97
|
+
}>>, Schema.toCodecJson<typeof ForbiddenError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"mcp.client", "GET", "/api/experimental/client-mcp", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
98
|
+
readonly location: Schema.optional<Schema.Struct<{
|
|
99
|
+
readonly directory: Schema.optional<Schema.String>;
|
|
100
|
+
}>>;
|
|
101
|
+
readonly name: Schema.String;
|
|
102
|
+
readonly ticket: Schema.optional<Schema.String>;
|
|
103
|
+
}>>, never, never, Schema.toCodecJson<Schema.Boolean>, Schema.toCodecJson<typeof LocationNotFoundError | typeof ForbiddenError>, never, never>, false>;
|
package/dist/groups/mcp.js
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import { Mcp } from "@opencode/schema/mcp";
|
|
2
2
|
import { Location } from "@opencode/schema/location";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { PtyTicket } from "@opencode/schema/pty-ticket";
|
|
4
|
+
import { Context, Schema } from "effect";
|
|
5
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
6
|
+
import { ForbiddenError, LocationNotFoundError, McpServerNotFoundError } from "../errors.js";
|
|
6
7
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
7
|
-
|
|
8
|
+
import { PTY_CONNECT_TICKET_QUERY, PTY_CONNECT_TOKEN_HEADER } from "./pty.js";
|
|
9
|
+
export const MCP_CLIENT_PATH = "/api/experimental/client-mcp";
|
|
10
|
+
export function hasMcpClientTicketURL(url) {
|
|
11
|
+
return url.pathname === MCP_CLIENT_PATH && !!url.searchParams.get(PTY_CONNECT_TICKET_QUERY);
|
|
12
|
+
}
|
|
13
|
+
const McpClientQuery = Schema.Struct({
|
|
14
|
+
...LocationQuery.fields,
|
|
15
|
+
name: Schema.String.check(Schema.isPattern(/^[a-zA-Z0-9_-]+$/)),
|
|
16
|
+
});
|
|
17
|
+
export const makeMcpGroup = (locationMiddleware) => HttpApiGroup.make("server.mcp")
|
|
8
18
|
.add(HttpApiEndpoint.get("mcp.list", "/api/mcp", {
|
|
9
19
|
query: LocationQuery,
|
|
10
20
|
success: Location.response(Schema.Array(Mcp.Server)),
|
|
@@ -74,5 +84,31 @@ export const McpGroup = HttpApiGroup.make("server.mcp")
|
|
|
74
84
|
identifier: "mcp.resource.catalog",
|
|
75
85
|
summary: "List MCP resources",
|
|
76
86
|
description: "Retrieve resources and resource templates from connected MCP servers.",
|
|
87
|
+
})))
|
|
88
|
+
.add(HttpApiEndpoint.post("mcp.clientToken", `${MCP_CLIENT_PATH}/token`, {
|
|
89
|
+
query: McpClientQuery,
|
|
90
|
+
headers: Schema.Struct({ [PTY_CONNECT_TOKEN_HEADER]: Schema.optional(Schema.String) }),
|
|
91
|
+
success: Location.response(PtyTicket.ConnectToken),
|
|
92
|
+
error: ForbiddenError,
|
|
93
|
+
})
|
|
94
|
+
.annotateMerge(locationQueryOpenApi)
|
|
95
|
+
.annotateMerge(OpenApi.annotations({
|
|
96
|
+
identifier: "experimental.mcp.client.token",
|
|
97
|
+
summary: "Create client MCP WebSocket token",
|
|
98
|
+
description: "Create a short-lived single-use ticket for opening a client MCP WebSocket connection from a browser.",
|
|
99
|
+
})))
|
|
100
|
+
// The client handler checks origin and ticket before it boots the location itself.
|
|
101
|
+
.middleware(locationMiddleware)
|
|
102
|
+
.add(HttpApiEndpoint.get("mcp.client", MCP_CLIENT_PATH, {
|
|
103
|
+
query: Schema.Struct({ ...McpClientQuery.fields, [PTY_CONNECT_TICKET_QUERY]: Schema.optional(Schema.String) }),
|
|
104
|
+
success: Schema.Boolean,
|
|
105
|
+
error: [ForbiddenError, LocationNotFoundError],
|
|
106
|
+
})
|
|
107
|
+
.annotateMerge(locationQueryOpenApi)
|
|
108
|
+
.annotateMerge(OpenApi.annotations({
|
|
109
|
+
identifier: "experimental.mcp.client",
|
|
110
|
+
summary: "Attach client MCP server",
|
|
111
|
+
description: "Upgrade to a WebSocket over which the client hosts an MCP server named after `name`; its tools stay available while the socket is open. One JSON-RPC message per text frame. Experimental: may change without compatibility guarantees.",
|
|
112
|
+
transform: (operation) => ({ ...operation, "x-websocket": true }),
|
|
77
113
|
})))
|
|
78
114
|
.annotateMerge(OpenApi.annotations({ title: "mcp", description: "MCP server and resource routes." }));
|
package/dist/groups/message.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare const SessionMessagesQuery: Schema.Struct<{
|
|
|
10
10
|
export declare const PublicSessionMessage: Schema.Union<readonly [Schema.Struct<{
|
|
11
11
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
12
12
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
13
|
-
fromEvent: (eventID:
|
|
13
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
14
14
|
};
|
|
15
15
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
16
16
|
readonly time: Schema.Struct<{
|
|
@@ -22,7 +22,7 @@ export declare const PublicSessionMessage: Schema.Union<readonly [Schema.Struct<
|
|
|
22
22
|
}>, Schema.Struct<{
|
|
23
23
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
24
24
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
25
|
-
fromEvent: (eventID:
|
|
25
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
26
26
|
};
|
|
27
27
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
28
28
|
readonly time: Schema.Struct<{
|
|
@@ -100,7 +100,7 @@ export declare const PublicSessionMessage: Schema.Union<readonly [Schema.Struct<
|
|
|
100
100
|
}>, Schema.Struct<{
|
|
101
101
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
102
102
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
103
|
-
fromEvent: (eventID:
|
|
103
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
104
104
|
};
|
|
105
105
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
106
106
|
readonly time: Schema.Struct<{
|
|
@@ -130,7 +130,7 @@ export declare const PublicSessionMessage: Schema.Union<readonly [Schema.Struct<
|
|
|
130
130
|
}>, Schema.Struct<{
|
|
131
131
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
132
132
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
133
|
-
fromEvent: (eventID:
|
|
133
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
134
134
|
};
|
|
135
135
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
136
136
|
readonly time: Schema.Struct<{
|
|
@@ -268,7 +268,7 @@ export declare const PublicSessionMessage: Schema.Union<readonly [Schema.Struct<
|
|
|
268
268
|
}>, Schema.Struct<{
|
|
269
269
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
270
270
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
271
|
-
fromEvent: (eventID:
|
|
271
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
272
272
|
};
|
|
273
273
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
274
274
|
readonly time: Schema.Struct<{
|
|
@@ -280,7 +280,7 @@ export declare const PublicSessionMessage: Schema.Union<readonly [Schema.Struct<
|
|
|
280
280
|
}>, Schema.Struct<{
|
|
281
281
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
282
282
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
283
|
-
fromEvent: (eventID:
|
|
283
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
284
284
|
};
|
|
285
285
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
286
286
|
readonly time: Schema.Struct<{
|
|
@@ -292,7 +292,7 @@ export declare const PublicSessionMessage: Schema.Union<readonly [Schema.Struct<
|
|
|
292
292
|
}>, Schema.Struct<{
|
|
293
293
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
294
294
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
295
|
-
fromEvent: (eventID:
|
|
295
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
296
296
|
};
|
|
297
297
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
298
298
|
readonly time: Schema.Struct<{
|
|
@@ -305,7 +305,7 @@ export declare const PublicSessionMessage: Schema.Union<readonly [Schema.Struct<
|
|
|
305
305
|
}>, Schema.Struct<{
|
|
306
306
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
307
307
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
308
|
-
fromEvent: (eventID:
|
|
308
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
309
309
|
};
|
|
310
310
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
311
311
|
readonly type: Schema.tag<"shell">;
|
|
@@ -334,7 +334,7 @@ export declare const PublicSessionMessage: Schema.Union<readonly [Schema.Struct<
|
|
|
334
334
|
}>, Schema.Struct<{
|
|
335
335
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
336
336
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
337
|
-
fromEvent: (eventID:
|
|
337
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
338
338
|
};
|
|
339
339
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
340
340
|
readonly type: Schema.tag<"assistant">;
|
|
@@ -534,7 +534,7 @@ export declare const PublicSessionMessage: Schema.Union<readonly [Schema.Struct<
|
|
|
534
534
|
}>, Schema.Union<readonly [Schema.Struct<{
|
|
535
535
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
536
536
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
537
|
-
fromEvent: (eventID:
|
|
537
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
538
538
|
};
|
|
539
539
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
540
540
|
readonly time: Schema.Struct<{
|
|
@@ -547,7 +547,7 @@ export declare const PublicSessionMessage: Schema.Union<readonly [Schema.Struct<
|
|
|
547
547
|
}>, Schema.Struct<{
|
|
548
548
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
549
549
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
550
|
-
fromEvent: (eventID:
|
|
550
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
551
551
|
};
|
|
552
552
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
553
553
|
readonly time: Schema.Struct<{
|
|
@@ -628,7 +628,7 @@ export declare const PublicSessionMessage: Schema.Union<readonly [Schema.Struct<
|
|
|
628
628
|
}>, Schema.Struct<{
|
|
629
629
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
630
630
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
631
|
-
fromEvent: (eventID:
|
|
631
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
632
632
|
};
|
|
633
633
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
634
634
|
readonly time: Schema.Struct<{
|
|
@@ -673,7 +673,7 @@ export declare const PublicSessionMessage: Schema.Union<readonly [Schema.Struct<
|
|
|
673
673
|
}>]>, Schema.Struct<{
|
|
674
674
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
675
675
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
676
|
-
fromEvent: (eventID:
|
|
676
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
677
677
|
};
|
|
678
678
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
679
679
|
readonly time: Schema.Struct<{
|
|
@@ -706,7 +706,6 @@ export declare const PublicSessionMessage: Schema.Union<readonly [Schema.Struct<
|
|
|
706
706
|
export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", HttpApiEndpoint.HttpApiEndpoint<"session.messages", "GET", "/api/session/:sessionID/message", Schema.toCodecStringTree<Schema.Struct<{
|
|
707
707
|
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
708
708
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
709
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
710
709
|
};
|
|
711
710
|
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
712
711
|
readonly limit: Schema.optional<Schema.NumberFromString>;
|
|
@@ -717,7 +716,7 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
|
|
|
717
716
|
readonly data: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
718
717
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
719
718
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
720
|
-
fromEvent: (eventID:
|
|
719
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
721
720
|
};
|
|
722
721
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
723
722
|
readonly time: Schema.Struct<{
|
|
@@ -729,7 +728,7 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
|
|
|
729
728
|
}>, Schema.Struct<{
|
|
730
729
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
731
730
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
732
|
-
fromEvent: (eventID:
|
|
731
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
733
732
|
};
|
|
734
733
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
735
734
|
readonly time: Schema.Struct<{
|
|
@@ -807,7 +806,7 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
|
|
|
807
806
|
}>, Schema.Struct<{
|
|
808
807
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
809
808
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
810
|
-
fromEvent: (eventID:
|
|
809
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
811
810
|
};
|
|
812
811
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
813
812
|
readonly time: Schema.Struct<{
|
|
@@ -837,7 +836,7 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
|
|
|
837
836
|
}>, Schema.Struct<{
|
|
838
837
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
839
838
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
840
|
-
fromEvent: (eventID:
|
|
839
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
841
840
|
};
|
|
842
841
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
843
842
|
readonly time: Schema.Struct<{
|
|
@@ -975,7 +974,7 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
|
|
|
975
974
|
}>, Schema.Struct<{
|
|
976
975
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
977
976
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
978
|
-
fromEvent: (eventID:
|
|
977
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
979
978
|
};
|
|
980
979
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
981
980
|
readonly time: Schema.Struct<{
|
|
@@ -987,7 +986,7 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
|
|
|
987
986
|
}>, Schema.Struct<{
|
|
988
987
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
989
988
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
990
|
-
fromEvent: (eventID:
|
|
989
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
991
990
|
};
|
|
992
991
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
993
992
|
readonly time: Schema.Struct<{
|
|
@@ -999,7 +998,7 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
|
|
|
999
998
|
}>, Schema.Struct<{
|
|
1000
999
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
1001
1000
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
1002
|
-
fromEvent: (eventID:
|
|
1001
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
1003
1002
|
};
|
|
1004
1003
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
1005
1004
|
readonly time: Schema.Struct<{
|
|
@@ -1012,7 +1011,7 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
|
|
|
1012
1011
|
}>, Schema.Struct<{
|
|
1013
1012
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
1014
1013
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
1015
|
-
fromEvent: (eventID:
|
|
1014
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
1016
1015
|
};
|
|
1017
1016
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
1018
1017
|
readonly type: Schema.tag<"shell">;
|
|
@@ -1041,7 +1040,7 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
|
|
|
1041
1040
|
}>, Schema.Struct<{
|
|
1042
1041
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
1043
1042
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
1044
|
-
fromEvent: (eventID:
|
|
1043
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
1045
1044
|
};
|
|
1046
1045
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
1047
1046
|
readonly type: Schema.tag<"assistant">;
|
|
@@ -1241,7 +1240,7 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
|
|
|
1241
1240
|
}>, Schema.Union<readonly [Schema.Struct<{
|
|
1242
1241
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
1243
1242
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
1244
|
-
fromEvent: (eventID:
|
|
1243
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
1245
1244
|
};
|
|
1246
1245
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
1247
1246
|
readonly time: Schema.Struct<{
|
|
@@ -1254,7 +1253,7 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
|
|
|
1254
1253
|
}>, Schema.Struct<{
|
|
1255
1254
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
1256
1255
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
1257
|
-
fromEvent: (eventID:
|
|
1256
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
1258
1257
|
};
|
|
1259
1258
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
1260
1259
|
readonly time: Schema.Struct<{
|
|
@@ -1335,7 +1334,7 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
|
|
|
1335
1334
|
}>, Schema.Struct<{
|
|
1336
1335
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
1337
1336
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
1338
|
-
fromEvent: (eventID:
|
|
1337
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
1339
1338
|
};
|
|
1340
1339
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
1341
1340
|
readonly time: Schema.Struct<{
|
|
@@ -1380,7 +1379,7 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
|
|
|
1380
1379
|
}>]>, Schema.Struct<{
|
|
1381
1380
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
1382
1381
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
1383
|
-
fromEvent: (eventID:
|
|
1382
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
1384
1383
|
};
|
|
1385
1384
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
1386
1385
|
readonly time: Schema.Struct<{
|
|
@@ -1,33 +1,7 @@
|
|
|
1
1
|
import { Context, Schema } from "effect";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema } from "effect/http-api";
|
|
3
3
|
import { ConflictError, LocationNotFoundError, PermissionNotFoundError, PermissionSavedNotFoundError, 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.saved.update", "PATCH", "/api/permission/saved/:id", Schema.toCodecStringTree<Schema.Struct<{
|
|
9
|
-
id: Schema.brand<Schema.String, "PermissionSaved.ID"> & {
|
|
10
|
-
create: () => string & import("effect/Brand").Brand<"PermissionSaved.ID">;
|
|
11
|
-
};
|
|
12
|
-
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
13
|
-
readonly action: Schema.optional<Schema.String>;
|
|
14
|
-
readonly resource: Schema.optional<Schema.String>;
|
|
15
|
-
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
16
|
-
readonly data: Schema.Struct<{
|
|
17
|
-
readonly id: Schema.brand<Schema.String, "PermissionSaved.ID"> & {
|
|
18
|
-
create: () => string & import("effect/Brand").Brand<"PermissionSaved.ID">;
|
|
19
|
-
};
|
|
20
|
-
readonly projectID: Schema.brand<Schema.String, "Project.ID"> & {
|
|
21
|
-
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
22
|
-
};
|
|
23
|
-
readonly action: Schema.String;
|
|
24
|
-
readonly resource: Schema.String;
|
|
25
|
-
readonly time: Schema.Struct<{
|
|
26
|
-
readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
27
|
-
readonly updated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
28
|
-
}>;
|
|
29
|
-
}>;
|
|
30
|
-
}>>, Schema.toCodecJson<typeof ConflictError | typeof PermissionSavedNotFoundError>, 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<{
|
|
31
5
|
readonly location: Schema.optional<Schema.Struct<{
|
|
32
6
|
readonly directory: Schema.optional<Schema.String>;
|
|
33
7
|
}>>;
|
|
@@ -38,7 +12,6 @@ export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.
|
|
|
38
12
|
readonly data: Schema.$Array<Schema.Struct<{
|
|
39
13
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
40
14
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
41
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
42
15
|
};
|
|
43
16
|
readonly action: Schema.String;
|
|
44
17
|
readonly resources: Schema.$Array<Schema.String>;
|
|
@@ -77,10 +50,35 @@ export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.
|
|
|
77
50
|
readonly updated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
78
51
|
}>;
|
|
79
52
|
}>>;
|
|
80
|
-
}>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
53
|
+
}>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"permission.saved.remove", "DELETE", "/api/permission/saved/:id", Schema.toCodecStringTree<Schema.Struct<{
|
|
54
|
+
id: Schema.brand<Schema.String, "PermissionSaved.ID"> & {
|
|
55
|
+
create: () => string & import("effect/Brand").Brand<"PermissionSaved.ID">;
|
|
56
|
+
};
|
|
57
|
+
}>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"permission.saved.update", "PATCH", "/api/permission/saved/:id", Schema.toCodecStringTree<Schema.Struct<{
|
|
58
|
+
id: Schema.brand<Schema.String, "PermissionSaved.ID"> & {
|
|
59
|
+
create: () => string & import("effect/Brand").Brand<"PermissionSaved.ID">;
|
|
60
|
+
};
|
|
61
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
62
|
+
readonly action: Schema.optional<Schema.String>;
|
|
63
|
+
readonly resource: Schema.optional<Schema.String>;
|
|
64
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
65
|
+
readonly data: Schema.Struct<{
|
|
66
|
+
readonly id: Schema.brand<Schema.String, "PermissionSaved.ID"> & {
|
|
67
|
+
create: () => string & import("effect/Brand").Brand<"PermissionSaved.ID">;
|
|
68
|
+
};
|
|
69
|
+
readonly projectID: Schema.brand<Schema.String, "Project.ID"> & {
|
|
70
|
+
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
71
|
+
};
|
|
72
|
+
readonly action: Schema.String;
|
|
73
|
+
readonly resource: Schema.String;
|
|
74
|
+
readonly time: Schema.Struct<{
|
|
75
|
+
readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
76
|
+
readonly updated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
77
|
+
}>;
|
|
78
|
+
}>;
|
|
79
|
+
}>>, Schema.toCodecJson<typeof ConflictError | typeof PermissionSavedNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"session.permission.create", "POST", "/api/session/:sessionID/permission", Schema.toCodecStringTree<Schema.Struct<{
|
|
81
80
|
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
82
81
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
83
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
84
82
|
};
|
|
85
83
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
86
84
|
readonly id: Schema.optional<Schema.brand<Schema.String, "Permission.ID"> & {
|
|
@@ -110,7 +108,6 @@ export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.
|
|
|
110
108
|
}>>, Schema.toCodecJson<typeof SessionNotFoundError>, SessionLocationId, HttpApiMiddleware.Requires<SessionLocationId>> | HttpApiEndpoint.HttpApiEndpoint<"session.permission.get", "GET", "/api/session/:sessionID/permission/:requestID", Schema.toCodecStringTree<Schema.Struct<{
|
|
111
109
|
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
112
110
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
113
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
114
111
|
};
|
|
115
112
|
requestID: Schema.brand<Schema.String, "Permission.ID"> & {
|
|
116
113
|
create: (id?: string) => string & import("effect/Brand").Brand<"Permission.ID">;
|
|
@@ -119,7 +116,6 @@ export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.
|
|
|
119
116
|
readonly data: Schema.Struct<{
|
|
120
117
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
121
118
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
122
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
123
119
|
};
|
|
124
120
|
readonly action: Schema.String;
|
|
125
121
|
readonly resources: Schema.$Array<Schema.String>;
|
|
@@ -142,13 +138,11 @@ export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.
|
|
|
142
138
|
}>>, Schema.toCodecJson<typeof SessionNotFoundError | typeof PermissionNotFoundError>, SessionLocationId, HttpApiMiddleware.Requires<SessionLocationId>> | HttpApiEndpoint.HttpApiEndpoint<"session.permission.list", "GET", "/api/session/:sessionID/permission", Schema.toCodecStringTree<Schema.Struct<{
|
|
143
139
|
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
144
140
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
145
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
146
141
|
};
|
|
147
142
|
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
148
143
|
readonly data: Schema.$Array<Schema.Struct<{
|
|
149
144
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
150
145
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
151
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
152
146
|
};
|
|
153
147
|
readonly action: Schema.String;
|
|
154
148
|
readonly resources: Schema.$Array<Schema.String>;
|
|
@@ -171,7 +165,6 @@ export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.
|
|
|
171
165
|
}>>, Schema.toCodecJson<typeof LocationNotFoundError | typeof SessionNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"session.permission.reply", "POST", "/api/session/:sessionID/permission/:requestID/reply", Schema.toCodecStringTree<Schema.Struct<{
|
|
172
166
|
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
173
167
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
174
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
175
168
|
};
|
|
176
169
|
requestID: Schema.brand<Schema.String, "Permission.ID"> & {
|
|
177
170
|
create: (id?: string) => string & import("effect/Brand").Brand<"Permission.ID">;
|
|
@@ -25,7 +25,6 @@ export declare const PersistentPtyGroup: HttpApiGroup.HttpApiGroup<"server.exper
|
|
|
25
25
|
}>>, Schema.toCodecJson<typeof ServiceUnavailableError | typeof ForbiddenError | typeof PtyNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"persistentPty.create", "POST", "/api/experimental/session/:sessionID/terminal", Schema.toCodecStringTree<Schema.Struct<{
|
|
26
26
|
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
27
27
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
28
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
29
28
|
};
|
|
30
29
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
31
30
|
readonly command: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
@@ -55,7 +54,6 @@ export declare const PersistentPtyGroup: HttpApiGroup.HttpApiGroup<"server.exper
|
|
|
55
54
|
readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
56
55
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
57
56
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
58
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
59
57
|
};
|
|
60
58
|
readonly foregroundProcess: Schema.NullOr<Schema.String>;
|
|
61
59
|
readonly size: Schema.Struct<{
|
|
@@ -87,7 +85,6 @@ export declare const PersistentPtyGroup: HttpApiGroup.HttpApiGroup<"server.exper
|
|
|
87
85
|
readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
88
86
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
89
87
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
90
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
91
88
|
};
|
|
92
89
|
readonly foregroundProcess: Schema.NullOr<Schema.String>;
|
|
93
90
|
readonly size: Schema.Struct<{
|
|
@@ -109,7 +106,6 @@ export declare const PersistentPtyGroup: HttpApiGroup.HttpApiGroup<"server.exper
|
|
|
109
106
|
}>>, Schema.toCodecJson<typeof ServiceUnavailableError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"persistentPty.list", "GET", "/api/experimental/session/:sessionID/terminal", Schema.toCodecStringTree<Schema.Struct<{
|
|
110
107
|
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
111
108
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
112
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
113
109
|
};
|
|
114
110
|
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
115
111
|
readonly data: Schema.$Array<Schema.Struct<{
|
|
@@ -126,7 +122,6 @@ export declare const PersistentPtyGroup: HttpApiGroup.HttpApiGroup<"server.exper
|
|
|
126
122
|
readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
127
123
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
128
124
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
129
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
130
125
|
};
|
|
131
126
|
readonly foregroundProcess: Schema.NullOr<Schema.String>;
|
|
132
127
|
readonly size: Schema.Struct<{
|
|
@@ -141,7 +136,6 @@ export declare const PersistentPtyGroup: HttpApiGroup.HttpApiGroup<"server.exper
|
|
|
141
136
|
}>>, Schema.toCodecJson<typeof InvalidRequestError | typeof ServiceUnavailableError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"persistentPty.read", "GET", "/api/experimental/session/:sessionID/terminal/read", Schema.toCodecStringTree<Schema.Struct<{
|
|
142
137
|
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
143
138
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
144
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
145
139
|
};
|
|
146
140
|
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
147
141
|
lines: Schema.optional<Schema.compose<Schema.Int, Schema.NumberFromString>>;
|
|
@@ -190,7 +184,6 @@ export declare const PersistentPtyGroup: HttpApiGroup.HttpApiGroup<"server.exper
|
|
|
190
184
|
readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
191
185
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
192
186
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
193
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
194
187
|
};
|
|
195
188
|
readonly foregroundProcess: Schema.NullOr<Schema.String>;
|
|
196
189
|
readonly size: Schema.Struct<{
|
|
@@ -235,7 +228,6 @@ export declare const PersistentPtyGroup: HttpApiGroup.HttpApiGroup<"server.exper
|
|
|
235
228
|
readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
236
229
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
237
230
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
238
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
239
231
|
};
|
|
240
232
|
readonly foregroundProcess: Schema.NullOr<Schema.String>;
|
|
241
233
|
readonly size: Schema.Struct<{
|