@opencode-ai/protocol 0.0.0-next-15718 → 0.0.0-next-15747
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 +2 -2
- package/dist/groups/agent.d.ts +3 -3
- package/dist/groups/command.d.ts +3 -3
- package/dist/groups/credential.d.ts +6 -6
- package/dist/groups/debug.d.ts +3 -3
- package/dist/groups/event.d.ts +2757 -2103
- package/dist/groups/form.d.ts +15 -15
- package/dist/groups/fs.d.ts +6 -6
- package/dist/groups/generate.d.ts +4 -4
- package/dist/groups/health.d.ts +4 -4
- package/dist/groups/integration.d.ts +32 -32
- package/dist/groups/location.d.ts +2 -2
- package/dist/groups/mcp.d.ts +5 -5
- package/dist/groups/message.d.ts +28 -28
- package/dist/groups/model.d.ts +5 -5
- package/dist/groups/permission.d.ts +15 -15
- package/dist/groups/plugin.d.ts +3 -3
- package/dist/groups/project-copy.d.ts +10 -10
- package/dist/groups/project.d.ts +7 -7
- package/dist/groups/provider.d.ts +6 -6
- package/dist/groups/pty.d.ts +19 -19
- package/dist/groups/question.d.ts +8 -8
- package/dist/groups/reference.d.ts +3 -3
- package/dist/groups/server.d.ts +2 -2
- package/dist/groups/session.d.ts +1215 -971
- package/dist/groups/session.js +14 -0
- package/dist/groups/shell.d.ts +18 -18
- package/dist/groups/skill.d.ts +3 -3
- package/dist/groups/vcs.d.ts +5 -5
- package/package.json +3 -3
|
@@ -2,12 +2,12 @@ import { Location } from "@opencode-ai/schema/location";
|
|
|
2
2
|
import { Context, Schema } from "effect";
|
|
3
3
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema } from "effect/unstable/httpapi";
|
|
4
4
|
import { PermissionNotFoundError, SessionNotFoundError } from "../errors.js";
|
|
5
|
-
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",
|
|
5
|
+
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<{
|
|
6
6
|
readonly location: Schema.optional<Schema.Struct<{
|
|
7
7
|
readonly directory: Schema.optional<Schema.String>;
|
|
8
8
|
readonly workspace: Schema.optional<Schema.String>;
|
|
9
9
|
}>>;
|
|
10
|
-
}>>,
|
|
10
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
11
11
|
readonly location: typeof Location.Info;
|
|
12
12
|
readonly data: Schema.$Array<Schema.Struct<{
|
|
13
13
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
@@ -31,11 +31,11 @@ export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.
|
|
|
31
31
|
create: (id?: string) => string & import("effect/Brand").Brand<"PermissionV2.ID">;
|
|
32
32
|
};
|
|
33
33
|
}>>;
|
|
34
|
-
}>>,
|
|
34
|
+
}>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"permission.saved.list", "GET", "/api/permission/saved", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
35
35
|
readonly projectID: Schema.optional<Schema.brand<Schema.String, "Project.ID"> & {
|
|
36
36
|
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
37
37
|
}>;
|
|
38
|
-
}>>,
|
|
38
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
39
39
|
readonly data: Schema.$Array<Schema.Struct<{
|
|
40
40
|
readonly id: Schema.brand<Schema.String, "PermissionSaved.ID"> & {
|
|
41
41
|
create: () => string & import("effect/Brand").Brand<"PermissionSaved.ID">;
|
|
@@ -46,16 +46,16 @@ export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.
|
|
|
46
46
|
readonly action: Schema.String;
|
|
47
47
|
readonly resource: Schema.String;
|
|
48
48
|
}>>;
|
|
49
|
-
}>>,
|
|
49
|
+
}>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"permission.saved.remove", "DELETE", "/api/permission/saved/:id", Schema.toCodecStringTree<Schema.Struct<{
|
|
50
50
|
id: Schema.brand<Schema.String, "PermissionSaved.ID"> & {
|
|
51
51
|
create: () => string & import("effect/Brand").Brand<"PermissionSaved.ID">;
|
|
52
52
|
};
|
|
53
|
-
}>>,
|
|
53
|
+
}>>, 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<{
|
|
54
54
|
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
55
55
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
56
56
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
57
57
|
};
|
|
58
|
-
}>>,
|
|
58
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
59
59
|
readonly id: Schema.optional<Schema.brand<Schema.String, "PermissionV2.ID"> & {
|
|
60
60
|
create: (id?: string) => string & import("effect/Brand").Brand<"PermissionV2.ID">;
|
|
61
61
|
}>;
|
|
@@ -73,19 +73,19 @@ export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.
|
|
|
73
73
|
readonly callID: Schema.String;
|
|
74
74
|
}>]>>, never, never>;
|
|
75
75
|
readonly agent: Schema.optional<Schema.brand<Schema.String, "Agent.ID">>;
|
|
76
|
-
}>>,
|
|
76
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
77
77
|
readonly data: Schema.Struct<{
|
|
78
78
|
readonly id: Schema.brand<Schema.String, "PermissionV2.ID"> & {
|
|
79
79
|
create: (id?: string) => string & import("effect/Brand").Brand<"PermissionV2.ID">;
|
|
80
80
|
};
|
|
81
81
|
readonly effect: Schema.Literals<readonly ["allow", "deny", "ask"]>;
|
|
82
82
|
}>;
|
|
83
|
-
}>>,
|
|
83
|
+
}>>, Schema.toCodecJson<typeof SessionNotFoundError>, SessionLocationId, HttpApiMiddleware.Requires<SessionLocationId>> | HttpApiEndpoint.HttpApiEndpoint<"session.permission.list", "GET", "/api/session/:sessionID/permission", Schema.toCodecStringTree<Schema.Struct<{
|
|
84
84
|
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
85
85
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
86
86
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
87
87
|
};
|
|
88
|
-
}>>,
|
|
88
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
89
89
|
readonly data: Schema.$Array<Schema.Struct<{
|
|
90
90
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
91
91
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
@@ -108,7 +108,7 @@ export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.
|
|
|
108
108
|
create: (id?: string) => string & import("effect/Brand").Brand<"PermissionV2.ID">;
|
|
109
109
|
};
|
|
110
110
|
}>>;
|
|
111
|
-
}>>,
|
|
111
|
+
}>>, Schema.toCodecJson<typeof SessionNotFoundError>, SessionLocationId, HttpApiMiddleware.Requires<SessionLocationId>> | HttpApiEndpoint.HttpApiEndpoint<"session.permission.get", "GET", "/api/session/:sessionID/permission/:requestID", Schema.toCodecStringTree<Schema.Struct<{
|
|
112
112
|
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
113
113
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
114
114
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
@@ -116,7 +116,7 @@ export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.
|
|
|
116
116
|
requestID: Schema.brand<Schema.String, "PermissionV2.ID"> & {
|
|
117
117
|
create: (id?: string) => string & import("effect/Brand").Brand<"PermissionV2.ID">;
|
|
118
118
|
};
|
|
119
|
-
}>>,
|
|
119
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
120
120
|
readonly data: Schema.Struct<{
|
|
121
121
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
122
122
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
@@ -139,7 +139,7 @@ export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.
|
|
|
139
139
|
create: (id?: string) => string & import("effect/Brand").Brand<"PermissionV2.ID">;
|
|
140
140
|
};
|
|
141
141
|
}>;
|
|
142
|
-
}>>,
|
|
142
|
+
}>>, Schema.toCodecJson<typeof SessionNotFoundError | typeof PermissionNotFoundError>, SessionLocationId, HttpApiMiddleware.Requires<SessionLocationId>> | HttpApiEndpoint.HttpApiEndpoint<"session.permission.reply", "POST", "/api/session/:sessionID/permission/:requestID/reply", Schema.toCodecStringTree<Schema.Struct<{
|
|
143
143
|
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
144
144
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
145
145
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
@@ -147,7 +147,7 @@ export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.
|
|
|
147
147
|
requestID: Schema.brand<Schema.String, "PermissionV2.ID"> & {
|
|
148
148
|
create: (id?: string) => string & import("effect/Brand").Brand<"PermissionV2.ID">;
|
|
149
149
|
};
|
|
150
|
-
}>>,
|
|
150
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
151
151
|
readonly reply: Schema.Literals<readonly ["once", "always", "reject"]>;
|
|
152
152
|
readonly message: Schema.optional<Schema.String>;
|
|
153
|
-
}>>,
|
|
153
|
+
}>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof SessionNotFoundError | typeof PermissionNotFoundError>, SessionLocationId, HttpApiMiddleware.Requires<SessionLocationId>>, false>;
|
package/dist/groups/plugin.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Location } from "@opencode-ai/schema/location";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
|
|
4
|
-
export declare const PluginGroup: HttpApiGroup.HttpApiGroup<"server.plugin", HttpApiEndpoint.HttpApiEndpoint<"plugin.list", "GET", "/api/plugin",
|
|
4
|
+
export declare const PluginGroup: HttpApiGroup.HttpApiGroup<"server.plugin", HttpApiEndpoint.HttpApiEndpoint<"plugin.list", "GET", "/api/plugin", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
5
5
|
readonly location: Schema.optional<Schema.Struct<{
|
|
6
6
|
readonly directory: Schema.optional<Schema.String>;
|
|
7
7
|
readonly workspace: Schema.optional<Schema.String>;
|
|
8
8
|
}>>;
|
|
9
|
-
}>>,
|
|
9
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
10
10
|
readonly location: typeof Location.Info;
|
|
11
11
|
readonly data: Schema.$Array<Schema.Struct<{
|
|
12
12
|
readonly id: Schema.brand<Schema.String, "Plugin.ID">;
|
|
13
13
|
}>>;
|
|
14
|
-
}>>,
|
|
14
|
+
}>>, never, never, never>, false>;
|
|
@@ -9,41 +9,41 @@ declare const ProjectCopyError_base: Schema.Class<ProjectCopyError, Schema.Struc
|
|
|
9
9
|
}>, import("effect/Cause").YieldableError>;
|
|
10
10
|
export declare class ProjectCopyError extends ProjectCopyError_base {
|
|
11
11
|
}
|
|
12
|
-
export declare const ProjectCopyGroup: HttpApiGroup.HttpApiGroup<"server.projectCopy", HttpApiEndpoint.HttpApiEndpoint<"projectCopy.create", "POST", "/experimental/project/:projectID/copy",
|
|
12
|
+
export declare const ProjectCopyGroup: HttpApiGroup.HttpApiGroup<"server.projectCopy", HttpApiEndpoint.HttpApiEndpoint<"projectCopy.create", "POST", "/experimental/project/:projectID/copy", Schema.toCodecStringTree<Schema.Struct<{
|
|
13
13
|
projectID: Schema.brand<Schema.String, "Project.ID"> & {
|
|
14
14
|
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
15
15
|
};
|
|
16
|
-
}>>,
|
|
16
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
17
17
|
readonly location: Schema.optional<Schema.Struct<{
|
|
18
18
|
readonly directory: Schema.optional<Schema.String>;
|
|
19
19
|
readonly workspace: Schema.optional<Schema.String>;
|
|
20
20
|
}>>;
|
|
21
|
-
}>>,
|
|
21
|
+
}>>, Schema.toCodecJson<Schema.Struct<{
|
|
22
22
|
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
23
23
|
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
24
24
|
readonly strategy: Schema.brand<Schema.Trim, "ProjectCopy.StrategyID">;
|
|
25
|
-
}>>,
|
|
25
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
26
26
|
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
27
|
-
}>>,
|
|
27
|
+
}>>, Schema.toCodecJson<typeof ProjectCopyError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"projectCopy.remove", "DELETE", "/experimental/project/:projectID/copy", Schema.toCodecStringTree<Schema.Struct<{
|
|
28
28
|
projectID: Schema.brand<Schema.String, "Project.ID"> & {
|
|
29
29
|
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
30
30
|
};
|
|
31
|
-
}>>,
|
|
31
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
32
32
|
readonly location: Schema.optional<Schema.Struct<{
|
|
33
33
|
readonly directory: Schema.optional<Schema.String>;
|
|
34
34
|
readonly workspace: Schema.optional<Schema.String>;
|
|
35
35
|
}>>;
|
|
36
|
-
}>>,
|
|
36
|
+
}>>, Schema.toCodecJson<Schema.Struct<{
|
|
37
37
|
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
38
38
|
readonly force: Schema.Boolean;
|
|
39
|
-
}>>,
|
|
39
|
+
}>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof ProjectCopyError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"projectCopy.refresh", "POST", "/experimental/project/:projectID/copy/refresh", Schema.toCodecStringTree<Schema.Struct<{
|
|
40
40
|
projectID: Schema.brand<Schema.String, "Project.ID"> & {
|
|
41
41
|
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
42
42
|
};
|
|
43
|
-
}>>,
|
|
43
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
44
44
|
readonly location: Schema.optional<Schema.Struct<{
|
|
45
45
|
readonly directory: Schema.optional<Schema.String>;
|
|
46
46
|
readonly workspace: Schema.optional<Schema.String>;
|
|
47
47
|
}>>;
|
|
48
|
-
}>>,
|
|
48
|
+
}>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof ProjectCopyError>, never, never>, false>;
|
|
49
49
|
export {};
|
package/dist/groups/project.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
|
|
3
|
-
export declare const ProjectGroup: HttpApiGroup.HttpApiGroup<"server.project", HttpApiEndpoint.HttpApiEndpoint<"project.list", "GET", "/api/project",
|
|
3
|
+
export declare const ProjectGroup: HttpApiGroup.HttpApiGroup<"server.project", HttpApiEndpoint.HttpApiEndpoint<"project.list", "GET", "/api/project", never, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
|
|
4
4
|
readonly id: Schema.brand<Schema.String, "Project.ID"> & {
|
|
5
5
|
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
6
6
|
};
|
|
@@ -27,26 +27,26 @@ export declare const ProjectGroup: HttpApiGroup.HttpApiGroup<"server.project", H
|
|
|
27
27
|
readonly initialized: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
28
28
|
}>;
|
|
29
29
|
readonly sandboxes: Schema.$Array<Schema.String>;
|
|
30
|
-
}>>>,
|
|
30
|
+
}>>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"project.current", "GET", "/api/project/current", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
31
31
|
readonly location: Schema.optional<Schema.Struct<{
|
|
32
32
|
readonly directory: Schema.optional<Schema.String>;
|
|
33
33
|
readonly workspace: Schema.optional<Schema.String>;
|
|
34
34
|
}>>;
|
|
35
|
-
}>>,
|
|
35
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
36
36
|
readonly id: Schema.brand<Schema.String, "Project.ID"> & {
|
|
37
37
|
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
38
38
|
};
|
|
39
39
|
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
40
|
-
}>>,
|
|
40
|
+
}>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"project.directories", "GET", "/api/project/:projectID/directories", Schema.toCodecStringTree<Schema.Struct<{
|
|
41
41
|
projectID: Schema.brand<Schema.String, "Project.ID"> & {
|
|
42
42
|
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
43
43
|
};
|
|
44
|
-
}>>,
|
|
44
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
45
45
|
readonly location: Schema.optional<Schema.Struct<{
|
|
46
46
|
readonly directory: Schema.optional<Schema.String>;
|
|
47
47
|
readonly workspace: Schema.optional<Schema.String>;
|
|
48
48
|
}>>;
|
|
49
|
-
}>>,
|
|
49
|
+
}>>, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
|
|
50
50
|
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
51
51
|
readonly strategy: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
52
|
-
}>>>,
|
|
52
|
+
}>>>, never, never, never>, false>;
|
|
@@ -3,12 +3,12 @@ import { Location } from "@opencode-ai/schema/location";
|
|
|
3
3
|
import { Schema } from "effect";
|
|
4
4
|
import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
|
|
5
5
|
import { ProviderNotFoundError, ServiceUnavailableError } from "../errors.js";
|
|
6
|
-
export declare const ProviderGroup: HttpApiGroup.HttpApiGroup<"server.provider", HttpApiEndpoint.HttpApiEndpoint<"provider.list", "GET", "/api/provider",
|
|
6
|
+
export declare const ProviderGroup: HttpApiGroup.HttpApiGroup<"server.provider", HttpApiEndpoint.HttpApiEndpoint<"provider.list", "GET", "/api/provider", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
7
7
|
readonly location: Schema.optional<Schema.Struct<{
|
|
8
8
|
readonly directory: Schema.optional<Schema.String>;
|
|
9
9
|
readonly workspace: Schema.optional<Schema.String>;
|
|
10
10
|
}>>;
|
|
11
|
-
}>>,
|
|
11
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
12
12
|
readonly location: typeof Location.Info;
|
|
13
13
|
readonly data: Schema.$Array<Schema.Struct<{
|
|
14
14
|
readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
|
|
@@ -34,7 +34,7 @@ export declare const ProviderGroup: HttpApiGroup.HttpApiGroup<"server.provider",
|
|
|
34
34
|
}> & {
|
|
35
35
|
empty: (id: Provider.ID) => Provider.Info;
|
|
36
36
|
}>;
|
|
37
|
-
}>>,
|
|
37
|
+
}>>, Schema.toCodecJson<typeof ServiceUnavailableError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"provider.get", "GET", "/api/provider/:providerID", Schema.toCodecStringTree<Schema.Struct<{
|
|
38
38
|
providerID: Schema.brand<Schema.String, "ProviderV2.ID"> & {
|
|
39
39
|
opencode: string & import("effect/Brand").Brand<"ProviderV2.ID">;
|
|
40
40
|
anthropic: string & import("effect/Brand").Brand<"ProviderV2.ID">;
|
|
@@ -48,12 +48,12 @@ export declare const ProviderGroup: HttpApiGroup.HttpApiGroup<"server.provider",
|
|
|
48
48
|
mistral: string & import("effect/Brand").Brand<"ProviderV2.ID">;
|
|
49
49
|
gitlab: string & import("effect/Brand").Brand<"ProviderV2.ID">;
|
|
50
50
|
};
|
|
51
|
-
}>>,
|
|
51
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
52
52
|
readonly location: Schema.optional<Schema.Struct<{
|
|
53
53
|
readonly directory: Schema.optional<Schema.String>;
|
|
54
54
|
readonly workspace: Schema.optional<Schema.String>;
|
|
55
55
|
}>>;
|
|
56
|
-
}>>,
|
|
56
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
57
57
|
readonly location: typeof Location.Info;
|
|
58
58
|
readonly data: Schema.Struct<{
|
|
59
59
|
readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
|
|
@@ -79,4 +79,4 @@ export declare const ProviderGroup: HttpApiGroup.HttpApiGroup<"server.provider",
|
|
|
79
79
|
}> & {
|
|
80
80
|
empty: (id: Provider.ID) => Provider.Info;
|
|
81
81
|
};
|
|
82
|
-
}>>,
|
|
82
|
+
}>>, Schema.toCodecJson<typeof ServiceUnavailableError | typeof ProviderNotFoundError>, never, never>, false>;
|
package/dist/groups/pty.d.ts
CHANGED
|
@@ -6,12 +6,12 @@ export declare const PTY_CONNECT_TICKET_QUERY = "ticket";
|
|
|
6
6
|
export declare const PTY_CONNECT_TOKEN_HEADER = "x-opencode-ticket";
|
|
7
7
|
export declare const PTY_CONNECT_TOKEN_HEADER_VALUE = "1";
|
|
8
8
|
export declare function hasPtyConnectTicketURL(url: URL): boolean;
|
|
9
|
-
export declare const PtyGroup: HttpApiGroup.HttpApiGroup<"server.pty", HttpApiEndpoint.HttpApiEndpoint<"pty.list", "GET", "/api/pty",
|
|
9
|
+
export declare const PtyGroup: HttpApiGroup.HttpApiGroup<"server.pty", HttpApiEndpoint.HttpApiEndpoint<"pty.list", "GET", "/api/pty", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
10
10
|
readonly location: Schema.optional<Schema.Struct<{
|
|
11
11
|
readonly directory: Schema.optional<Schema.String>;
|
|
12
12
|
readonly workspace: Schema.optional<Schema.String>;
|
|
13
13
|
}>>;
|
|
14
|
-
}>>,
|
|
14
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
15
15
|
readonly location: typeof Location.Info;
|
|
16
16
|
readonly data: Schema.$Array<Schema.Struct<{
|
|
17
17
|
readonly id: Schema.brand<Schema.String, "PtyID"> & {
|
|
@@ -26,18 +26,18 @@ export declare const PtyGroup: HttpApiGroup.HttpApiGroup<"server.pty", HttpApiEn
|
|
|
26
26
|
readonly pid: Schema.Int;
|
|
27
27
|
readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
28
28
|
}>>;
|
|
29
|
-
}>>,
|
|
29
|
+
}>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"pty.create", "POST", "/api/pty", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
30
30
|
readonly location: Schema.optional<Schema.Struct<{
|
|
31
31
|
readonly directory: Schema.optional<Schema.String>;
|
|
32
32
|
readonly workspace: Schema.optional<Schema.String>;
|
|
33
33
|
}>>;
|
|
34
|
-
}>>,
|
|
34
|
+
}>>, Schema.toCodecJson<Schema.Struct<{
|
|
35
35
|
readonly command: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
36
36
|
readonly args: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
|
|
37
37
|
readonly cwd: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
38
38
|
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
39
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
|
-
}>>,
|
|
40
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
41
41
|
readonly location: typeof Location.Info;
|
|
42
42
|
readonly data: Schema.Struct<{
|
|
43
43
|
readonly id: Schema.brand<Schema.String, "PtyID"> & {
|
|
@@ -52,17 +52,17 @@ export declare const PtyGroup: HttpApiGroup.HttpApiGroup<"server.pty", HttpApiEn
|
|
|
52
52
|
readonly pid: Schema.Int;
|
|
53
53
|
readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
54
54
|
}>;
|
|
55
|
-
}>>,
|
|
55
|
+
}>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"pty.get", "GET", "/api/pty/:ptyID", Schema.toCodecStringTree<Schema.Struct<{
|
|
56
56
|
ptyID: Schema.brand<Schema.String, "PtyID"> & {
|
|
57
57
|
create: () => string & import("effect/Brand").Brand<"PtyID">;
|
|
58
58
|
ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
|
|
59
59
|
};
|
|
60
|
-
}>>,
|
|
60
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
61
61
|
readonly location: Schema.optional<Schema.Struct<{
|
|
62
62
|
readonly directory: Schema.optional<Schema.String>;
|
|
63
63
|
readonly workspace: Schema.optional<Schema.String>;
|
|
64
64
|
}>>;
|
|
65
|
-
}>>,
|
|
65
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
66
66
|
readonly location: typeof Location.Info;
|
|
67
67
|
readonly data: Schema.Struct<{
|
|
68
68
|
readonly id: Schema.brand<Schema.String, "PtyID"> & {
|
|
@@ -77,17 +77,17 @@ export declare const PtyGroup: HttpApiGroup.HttpApiGroup<"server.pty", HttpApiEn
|
|
|
77
77
|
readonly pid: Schema.Int;
|
|
78
78
|
readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
79
79
|
}>;
|
|
80
|
-
}>>,
|
|
80
|
+
}>>, Schema.toCodecJson<typeof PtyNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"pty.update", "PUT", "/api/pty/:ptyID", Schema.toCodecStringTree<Schema.Struct<{
|
|
81
81
|
ptyID: Schema.brand<Schema.String, "PtyID"> & {
|
|
82
82
|
create: () => string & import("effect/Brand").Brand<"PtyID">;
|
|
83
83
|
ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
|
|
84
84
|
};
|
|
85
|
-
}>>,
|
|
85
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
86
86
|
readonly location: Schema.optional<Schema.Struct<{
|
|
87
87
|
readonly directory: Schema.optional<Schema.String>;
|
|
88
88
|
readonly workspace: Schema.optional<Schema.String>;
|
|
89
89
|
}>>;
|
|
90
|
-
}>>,
|
|
90
|
+
}>>, Schema.toCodecJson<Schema.Struct<{
|
|
91
91
|
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
92
92
|
readonly size: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
93
93
|
readonly rows: Schema.Int;
|
|
@@ -96,7 +96,7 @@ export declare const PtyGroup: HttpApiGroup.HttpApiGroup<"server.pty", HttpApiEn
|
|
|
96
96
|
readonly rows: Schema.Int;
|
|
97
97
|
readonly cols: Schema.Int;
|
|
98
98
|
}>>, never, never>;
|
|
99
|
-
}>>,
|
|
99
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
100
100
|
readonly location: typeof Location.Info;
|
|
101
101
|
readonly data: Schema.Struct<{
|
|
102
102
|
readonly id: Schema.brand<Schema.String, "PtyID"> & {
|
|
@@ -111,35 +111,35 @@ export declare const PtyGroup: HttpApiGroup.HttpApiGroup<"server.pty", HttpApiEn
|
|
|
111
111
|
readonly pid: Schema.Int;
|
|
112
112
|
readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
113
113
|
}>;
|
|
114
|
-
}>>,
|
|
114
|
+
}>>, Schema.toCodecJson<typeof PtyNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"pty.remove", "DELETE", "/api/pty/:ptyID", Schema.toCodecStringTree<Schema.Struct<{
|
|
115
115
|
ptyID: Schema.brand<Schema.String, "PtyID"> & {
|
|
116
116
|
create: () => string & import("effect/Brand").Brand<"PtyID">;
|
|
117
117
|
ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
|
|
118
118
|
};
|
|
119
|
-
}>>,
|
|
119
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
120
120
|
readonly location: Schema.optional<Schema.Struct<{
|
|
121
121
|
readonly directory: Schema.optional<Schema.String>;
|
|
122
122
|
readonly workspace: Schema.optional<Schema.String>;
|
|
123
123
|
}>>;
|
|
124
|
-
}>>,
|
|
124
|
+
}>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof PtyNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"pty.connectToken", "POST", "/api/pty/:ptyID/connect-token", Schema.toCodecStringTree<Schema.Struct<{
|
|
125
125
|
ptyID: Schema.brand<Schema.String, "PtyID"> & {
|
|
126
126
|
create: () => string & import("effect/Brand").Brand<"PtyID">;
|
|
127
127
|
ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
|
|
128
128
|
};
|
|
129
|
-
}>>,
|
|
129
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
130
130
|
readonly location: Schema.optional<Schema.Struct<{
|
|
131
131
|
readonly directory: Schema.optional<Schema.String>;
|
|
132
132
|
readonly workspace: Schema.optional<Schema.String>;
|
|
133
133
|
}>>;
|
|
134
|
-
}>>,
|
|
134
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
135
135
|
readonly location: typeof Location.Info;
|
|
136
136
|
readonly data: Schema.Struct<{
|
|
137
137
|
readonly ticket: Schema.String;
|
|
138
138
|
readonly expires_in: Schema.Int;
|
|
139
139
|
}>;
|
|
140
|
-
}>>,
|
|
140
|
+
}>>, Schema.toCodecJson<typeof ForbiddenError | typeof PtyNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"pty.connect", "GET", "/api/pty/:ptyID/connect", Schema.toCodecStringTree<Schema.Struct<{
|
|
141
141
|
ptyID: Schema.brand<Schema.String, "PtyID"> & {
|
|
142
142
|
create: () => string & import("effect/Brand").Brand<"PtyID">;
|
|
143
143
|
ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
|
|
144
144
|
};
|
|
145
|
-
}>>,
|
|
145
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Boolean>, Schema.toCodecJson<typeof ForbiddenError | typeof PtyNotFoundError>, never, never>, false>;
|
|
@@ -2,12 +2,12 @@ import { Location } from "@opencode-ai/schema/location";
|
|
|
2
2
|
import { Context, Schema } from "effect";
|
|
3
3
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema } from "effect/unstable/httpapi";
|
|
4
4
|
import { QuestionNotFoundError, SessionNotFoundError } from "../errors.js";
|
|
5
|
-
export declare const makeQuestionGroup: <LocationId extends HttpApiMiddleware.AnyId, LocationService, SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService>(locationMiddleware: Context.Key<LocationId, LocationService>, sessionLocationMiddleware: Context.Key<SessionLocationId, SessionLocationService>) => HttpApiGroup.HttpApiGroup<"server.question", HttpApiEndpoint.HttpApiEndpoint<"question.request.list", "GET", "/api/question/request",
|
|
5
|
+
export declare const makeQuestionGroup: <LocationId extends HttpApiMiddleware.AnyId, LocationService, SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService>(locationMiddleware: Context.Key<LocationId, LocationService>, sessionLocationMiddleware: Context.Key<SessionLocationId, SessionLocationService>) => HttpApiGroup.HttpApiGroup<"server.question", HttpApiEndpoint.HttpApiEndpoint<"question.request.list", "GET", "/api/question/request", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
6
6
|
readonly location: Schema.optional<Schema.Struct<{
|
|
7
7
|
readonly directory: Schema.optional<Schema.String>;
|
|
8
8
|
readonly workspace: Schema.optional<Schema.String>;
|
|
9
9
|
}>>;
|
|
10
|
-
}>>,
|
|
10
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
11
11
|
readonly location: typeof Location.Info;
|
|
12
12
|
readonly data: Schema.$Array<Schema.Struct<{
|
|
13
13
|
readonly id: Schema.brand<Schema.String, "QuestionV2.ID"> & {
|
|
@@ -36,12 +36,12 @@ export declare const makeQuestionGroup: <LocationId extends HttpApiMiddleware.An
|
|
|
36
36
|
readonly callID: Schema.String;
|
|
37
37
|
}>>, never, never>;
|
|
38
38
|
}>>;
|
|
39
|
-
}>>,
|
|
39
|
+
}>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"session.question.list", "GET", "/api/session/:sessionID/question", Schema.toCodecStringTree<Schema.Struct<{
|
|
40
40
|
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
41
41
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
42
42
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
43
43
|
};
|
|
44
|
-
}>>,
|
|
44
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
45
45
|
readonly data: Schema.$Array<Schema.Struct<{
|
|
46
46
|
readonly id: Schema.brand<Schema.String, "QuestionV2.ID"> & {
|
|
47
47
|
create: () => string & import("effect/Brand").Brand<"QuestionV2.ID">;
|
|
@@ -69,7 +69,7 @@ export declare const makeQuestionGroup: <LocationId extends HttpApiMiddleware.An
|
|
|
69
69
|
readonly callID: Schema.String;
|
|
70
70
|
}>>, never, never>;
|
|
71
71
|
}>>;
|
|
72
|
-
}>>,
|
|
72
|
+
}>>, Schema.toCodecJson<typeof SessionNotFoundError>, SessionLocationId, HttpApiMiddleware.Requires<SessionLocationId>> | HttpApiEndpoint.HttpApiEndpoint<"session.question.reply", "POST", "/api/session/:sessionID/question/:requestID/reply", Schema.toCodecStringTree<Schema.Struct<{
|
|
73
73
|
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
74
74
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
75
75
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
@@ -78,9 +78,9 @@ export declare const makeQuestionGroup: <LocationId extends HttpApiMiddleware.An
|
|
|
78
78
|
create: () => string & import("effect/Brand").Brand<"QuestionV2.ID">;
|
|
79
79
|
ascending: (id?: string) => string & import("effect/Brand").Brand<"QuestionV2.ID">;
|
|
80
80
|
};
|
|
81
|
-
}>>,
|
|
81
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
82
82
|
readonly answers: Schema.$Array<Schema.$Array<Schema.String>>;
|
|
83
|
-
}>>,
|
|
83
|
+
}>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof SessionNotFoundError | typeof QuestionNotFoundError>, SessionLocationId, HttpApiMiddleware.Requires<SessionLocationId>> | HttpApiEndpoint.HttpApiEndpoint<"session.question.reject", "POST", "/api/session/:sessionID/question/:requestID/reject", Schema.toCodecStringTree<Schema.Struct<{
|
|
84
84
|
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
85
85
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
86
86
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
@@ -89,4 +89,4 @@ export declare const makeQuestionGroup: <LocationId extends HttpApiMiddleware.An
|
|
|
89
89
|
create: () => string & import("effect/Brand").Brand<"QuestionV2.ID">;
|
|
90
90
|
ascending: (id?: string) => string & import("effect/Brand").Brand<"QuestionV2.ID">;
|
|
91
91
|
};
|
|
92
|
-
}>>,
|
|
92
|
+
}>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof SessionNotFoundError | typeof QuestionNotFoundError>, SessionLocationId, HttpApiMiddleware.Requires<SessionLocationId>>, false>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Location } from "@opencode-ai/schema/location";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
|
|
4
|
-
export declare const ReferenceGroup: HttpApiGroup.HttpApiGroup<"server.reference", HttpApiEndpoint.HttpApiEndpoint<"reference.list", "GET", "/api/reference",
|
|
4
|
+
export declare const ReferenceGroup: HttpApiGroup.HttpApiGroup<"server.reference", HttpApiEndpoint.HttpApiEndpoint<"reference.list", "GET", "/api/reference", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
5
5
|
readonly location: Schema.optional<Schema.Struct<{
|
|
6
6
|
readonly directory: Schema.optional<Schema.String>;
|
|
7
7
|
readonly workspace: Schema.optional<Schema.String>;
|
|
8
8
|
}>>;
|
|
9
|
-
}>>,
|
|
9
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
10
10
|
readonly location: typeof Location.Info;
|
|
11
11
|
readonly data: Schema.$Array<Schema.Struct<{
|
|
12
12
|
readonly name: Schema.String;
|
|
@@ -26,4 +26,4 @@ export declare const ReferenceGroup: HttpApiGroup.HttpApiGroup<"server.reference
|
|
|
26
26
|
readonly hidden: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
27
27
|
}>]>;
|
|
28
28
|
}>>;
|
|
29
|
-
}>>,
|
|
29
|
+
}>>, never, never, never>, false>;
|
package/dist/groups/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
|
|
3
|
-
export declare const ServerGroup: HttpApiGroup.HttpApiGroup<"server.server", HttpApiEndpoint.HttpApiEndpoint<"server.get", "GET", "/api/server",
|
|
3
|
+
export declare const ServerGroup: HttpApiGroup.HttpApiGroup<"server.server", HttpApiEndpoint.HttpApiEndpoint<"server.get", "GET", "/api/server", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
4
4
|
readonly urls: Schema.$Array<Schema.String>;
|
|
5
|
-
}>>,
|
|
5
|
+
}>>, never, never, never>, false>;
|